From 6699be67052835d476b6023c0733e95633a9b438 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Jul 2023 15:41:15 +0200 Subject: [PATCH] Bug 23336: Compare strings with eq instead of == And don't ignore warnings next time ;) --- Koha/Token.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Token.pm b/Koha/Token.pm index 62b5a6c7392..b7cdd3ad96e 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.25.1