Bugzilla – Attachment 193839 Details for
Bug 41926
Disable OPAC search form after first submitting it, as a counter measure to spam
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41926: Prevent resubmits from masthead search form
Bug-41926-Prevent-resubmits-from-masthead-search-f.patch (text/plain), 1.93 KB, created by
Lari Taskula
on 2026-02-25 10:03:22 UTC
(
hide
)
Description:
Bug 41926: Prevent resubmits from masthead search form
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2026-02-25 10:03:22 UTC
Size:
1.93 KB
patch
obsolete
>From f99d0dcead379dbb6deb934cf9eaed9368b207a4 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Wed, 25 Feb 2026 11:56:24 +0200 >Subject: [PATCH] Bug 41926: Prevent resubmits from masthead search form > >To test: >0. Before applying this patch, >1. Open a console and run the following command >tail -f /var/log/apache2/other_vhosts_access.log -n 0 | grep 'GET /cgi-bin/koha/opac-search.pl' >2. Navigate to your OPAC main page >3. Observe "Search the catalog" text box and the green search icon to the right >4. Click the search icon as many times and as fast as you can >5. Observe the console window from step 1 having multiple requests >6. Apply patch, >7. Press Ctrl+C in your console and type "clear" (without quotes)" >8. Repeat steps 1-4 >9. Observe the console window from step 1 only having one request >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 2b6d4478d6d..51f2c151965 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -232,7 +232,7 @@ > [% IF ( OpacCustomSearch ) %] > [% PROCESS koha_news_block news => OpacCustomSearch %] > [% ELSE %] >- <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform"> >+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="submit-form-prevent-resubmit"> > <div class="row gx-2"> > <div class="col-sm-auto order-2 order-sm-2"> > <label for="masthead_search" class="visually-hidden">Search the catalog by:</label> >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41926
:
193835
|
193838
| 193839