https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35276

--- Comment #2 from Marcel de Rooy <[email protected]> ---
Fix is underway.

When you login on the suggestion/suggestion.pl url, Auth will add a few params
which are copied into the Koha Objects->as_list call. We need to remove them.

The fact that this only happens when directly hitting the URL when not logged
in, makes me keep the current severity.

Some crash details:
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Unknown column 'auth_forwarded_hash' in 'where clause' at
/usr/share/koha/Koha/Objects.pm line 394
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
   
DBIx::Class::Storage::DBI::_dbh_execute('DBIx::Class::Storage::DBI::mysql=HASH(0x5564b8285490)',
'DBI::db=HASH(0x5564baa26de0)', 'SELECT `me`.`suggestionid`,
`me`.`suggestedby`, `me`.`suggesteddate`, `me`.`managedby`, `me`.`manageddate`,
`me`.`acceptedby`, `me`.`accepteddate`, `me`.`rejectedby`, `me`.`rejecteddate`,
`me`.`lastmodificationby`, `me`.`lastmodificationdate`, `me`.`STATUS`,
`me`.`archived`, `me`.`note`, `me`.`staff_note`, `me`.`author`, `me`.`title`,
`me`.`copyrightdate`, `me`.`publishercode`, `me`.`date`, `me`.`volumedesc`,
`me`.`publicationyear`, `me`.`place`, `me`.`isbn`, `me`.`biblionumber`,
`me`.`reason`, `me`.`patronreason`, `me`.`budgetid`, `me`.`branchcode`,
`me`.`collectiontitle`, `me`.`itemtype`, `me`.`quantity`, `me`.`currency`,
`me`.`price`, `me`.`total` FROM `suggestions` `me` WHERE ( ( `STATUS` = ? AND
`archived` = ? AND `auth_forwarded_hash` = ? AND `branchcode` = ? AND
`koha_login_context` = ? AND `password` = ? AND `userid` = ? ) )',
'ARRAY(0x5564b85a9e98)', 'ARRAY(0x5564bb7fc430)') called at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 856
        Koha::Objects::as_list('Koha::Suggestions=HASH(0x5564bd270de8)') called
at /usr/share/koha/suggestion/suggestion.pl line 426
        eval {...} at /usr/share/koha/suggestion/suggestion.pl line 564

=> Look at the WHERE clause and note the presence of auth_forwarded_hash,
koha_login_context, password and userid.

Actually, the suggestion code could be improved further. This should not be
done really:
my $suggestion_ref  = { %{$input->Vars} }; # Copying, otherwise $input will be
modified
Here we get the additional cruft from Auth into our suggestion hash.

The fix simply removes them without a complete refactor of the script.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to