From e1f232931dd2c84ed1bf552fa0e5a8119fef6b7d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 8 Mar 2024 12:32:14 -0800 Subject: [PATCH] Remove CSRF handling This was required at some point in the past, but it appears to no longer be necessary! --- push.pl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/push.pl b/push.pl index a4703d8a1..d9ef38e25 100755 --- a/push.pl +++ b/push.pl @@ -50,18 +50,8 @@ die 'login failed: ' . $login->res->error->{message} unless $login->res->is_succ my $token = $login->res->json->{token}; -my $csrf; -for my $cookie (@{ $login->res->cookies }) { - if ($cookie->name eq 'csrftoken') { - $csrf = $cookie->value; - last; - } -} -die 'missing CSRF token' unless defined $csrf; - my $authorizationHeader = { Authorization => "JWT $token", - 'X-CSRFToken' => $csrf, }; my $supportedTagsRegex = qr%^(# Supported tags and respective `Dockerfile` links\n\n)(.*?\n)(?=# |\[)%ms;