@@ -, +, @@ rec. with an invalid authid ->find without verifying that it was succesful. authid, e.g. in ktd, with standard ktd test data: http://your_ktd:8081/cgi-bin/koha/authorities/authorities.pl?authid=100000 Koha should explode with the message: Can't call method "authtypecode" on an undefined value at /kohadevbox/koha/authorities/authorities.pl line 556 --- authorities/authorities.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/authorities/authorities.pl +++ a/authorities/authorities.pl @@ -552,11 +552,15 @@ if ( $op eq 'cud-change-framework' ) { } my $dbh = C4::Context->dbh; +my $authobj = Koha::Authorities->find($authid); +if ( defined $authid && !$authid || $authid && !$authobj ) { + print $input->redirect("/cgi-bin/koha/errors/404.pl"); # escape early + exit; +} if(!$authtypecode) { - $authtypecode = $authid ? Koha::Authorities->find($authid)->authtypecode : ''; + $authtypecode = $authid ? $authobj->authtypecode : ''; } -my $authobj = Koha::Authorities->find($authid); my $count = $authobj ? $authobj->get_usage_count : 0; my ($template, $loggedinuser, $cookie) --