@@ -, +, @@ patch... - adding the suggestion should succeed http://yourkoha.org/cgi-bin/koha/opac-suggestions.pl - adding the suggestion should fail NOTE: the 'secret' field should now be hidden via javascript - adding the suggestion should succeed --- koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt | 8 ++++++++ opac/opac-suggestions.pl | 8 ++++++++ 2 files changed, 16 insertions(+) --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt @@ -21,6 +21,10 @@ }[% END %] $(function() { + + // BZ 3144 - dont display 'secret' recaptcha field + $("#secret").remove(); + $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, { "aaSorting": [[ 1, "asc" ]], "aoColumnDefs": [ @@ -124,6 +128,10 @@ [% END %][% END %]
  • + + +
  • +
    Cancel
    --- a/opac/opac-suggestions.pl +++ a/opac/opac-suggestions.pl @@ -33,6 +33,14 @@ my $input = new CGI; my $allsuggestions = $input->param('showall'); my $op = $input->param('op'); my $suggestion = $input->Vars; +my $recaptcha = $input->param('secret'); + +# BZ 3144 - if a spambot accidentally populates the 'secret' field in the submission form, then silently skip suggestion and return. +if ($recaptcha ) { + print $input->redirect("/cgi-bin/koha/opac-suggestions.pl"); + exit; +} + delete $$suggestion{$_} foreach qw; $op = 'else' unless $op; --