From c62bad257c5179a6148af1fc32230c2e1557328f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 1 Feb 2022 17:07:45 +0100 Subject: [PATCH] Bug 23991: Fix conflict with bug 28941 Well, this patchset fixed the security bug... Redoing on top of bug 28941 --- opac/opac-suggestions.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index e31c5b619ab..8c6c3e6b811 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -127,14 +127,12 @@ if ( $op eq 'else' ) { } } -my @suggestion_fields = - qw( title author copyrightdate isbn publishercode collectiontitle place quantity itemtype patronreason note ); -my $suggestion = { +$suggestion = { map { + my $p = $suggestion->{$_} # Keep parameters that are not an empty string - my $p = $input->param($_); ( defined $p && $p ne '' ? ( $_ => $p ) : () ) - } @suggestion_fields + } keys %$suggestion }; $suggestion->{suggestedby} = $borrowernumber; -- 2.25.1