From 7da1a8db97fa4606714258e46ae90faf399cfd66 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Jul 2023 15:41:15 +0200 Subject: [PATCH] Bug 34212: Compare strings with eq instead of == And don't ignore warnings next time ;) Signed-off-by: Martin Renvoize --- Koha/Token.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Token.pm b/Koha/Token.pm index 62b5a6c739..b7cdd3ad96 100644 --- a/Koha/Token.pm +++ b/Koha/Token.pm @@ -295,7 +295,7 @@ sub _chk_jwt { my $claims = Mojo::JWT->new(secret => $params->{secret})->decode($params->{token}); - return 1 if exists $claims->{id} && $claims->{id} == $params->{id}; + return 1 if exists $claims->{id} && $claims->{id} eq $params->{id}; } sub _decode_jwt { -- 2.41.0