@@ -, +, @@ http://nedbatchelder.com/text/stopbots.html https://github.com/subwindow/negative-captcha http://www.rubydoc.info/github/subwindow/negative-captcha/frames adding the suggestion should succeed to reveal the hidden 'negcap' field replace line 87 opac-suggestions.tt, from...
  • to ...
  • adding the suggestion should fail --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 6 ++++++ opac/opac-suggestions.pl | 8 ++++++++ 2 files changed, 14 insertions(+) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -83,6 +83,12 @@
  • + + +
  • + negcap +
  • +
    --- 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 $negcaptcha = $input->param('negcap'); + +# If a spambot accidentally populates the 'negcap' field in the sugesstions form, then silently skip and return. +if ($negcaptcha ) { + print $input->redirect("/cgi-bin/koha/opac-suggestions.pl"); + exit; +} + delete $$suggestion{$_} foreach qw; $op = 'else' unless $op; --