Signed-off-by: Max Carrara <m.carr...@proxmox.com>
---
As the old inline comment notes, this should've been removed in
PVE 7.0 already.

 src/PVE/Ticket.pm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/PVE/Ticket.pm b/src/PVE/Ticket.pm
index ce8d5c8..c5508ed 100644
--- a/src/PVE/Ticket.pm
+++ b/src/PVE/Ticket.pm
@@ -34,13 +34,7 @@ sub verify_csrf_prevention_token {
        my $timestamp = $1;
        my $ttime = hex($timestamp);
 
-       my $digest;
-       if (length($sig) == 27) {
-           # detected sha1 csrf token from older proxy, fallback. FIXME: 
remove with 7.0
-           $digest = Digest::SHA::sha1_base64("$timestamp:$username", $secret);
-       } else {
-           $digest = Digest::SHA::hmac_sha256_base64("$timestamp:$username", 
$secret);
-       }
+       my $digest = Digest::SHA::hmac_sha256_base64("$timestamp:$username", 
$secret);
 
        my $age = time() - $ttime;
        return 1 if ($digest eq $sig) && ($age > $min_age) &&
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to