[Koha-bugs] [Bug 29646] New: opac-password-recovery crash on wrong borrower_number
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Dec 6 08:54:17 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29646
Bug ID: 29646
Summary: opac-password-recovery crash on wrong borrower_number
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: m.de.rooy at rijksmuseum.nl
QA Contact: testopia at bugs.koha-community.org
Seeing this in 20.11 but code in master has not changed:
Can't call method "category" on an undefined value at
/usr/share/koha/opac/opac-password-recovery.pl line 204
eval {...} at /usr/share/koha/opac/opac-password-recovery.pl line 2
CGI::Compile::ROOT::usr_share_koha_opac_opac_2dpassword_2drecovery_2epl::__ANON__('CGI::Compile=HASH(0x56477a9a9208)',
'', '/usr/share/koha/opac/opac-password-recovery.pl', '/usr/share/koha/opac',
'ARRAY(0x56477b4391f0)') called at /usr/share/perl5/CGI/Compile.pm line 151
Code looks like:
if ( !$borrower_number ) {
$errLinkNotValid = 1;
}
my $borrower = Koha::Patrons->find($borrower_number);
$template->param(
new_password => 1,
email => $email,
uniqueKey => $uniqueKey,
username => $username,
errLinkNotValid => $errLinkNotValid,
hasError => ( $errLinkNotValid ? 1 : 0 ),
minPasswordLength =>
$borrower->category->effective_min_password_length,
RequireStrongPassword =>
$borrower->category->effective_require_strong_password
If the borrower_number is not found, the $borrower->category crashes.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list