Bugzilla – Attachment 167077 Details for
Bug 36931
label-item-search.pl paging doesn't work (due to CSRF changes)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36931: Fix label-item-search.pl by removing CSRF requirement
Bug-36931-Fix-label-item-searchpl-by-removing-CSRF.patch (text/plain), 2.26 KB, created by
David Nind
on 2024-05-23 08:26:36 UTC
(
hide
)
Description:
Bug 36931: Fix label-item-search.pl by removing CSRF requirement
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-05-23 08:26:36 UTC
Size:
2.26 KB
patch
obsolete
>From 56f3a073323a71d39bac28865f9af8b85baeec6b Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 23 May 2024 06:43:40 +0000 >Subject: [PATCH] Bug 36931: Fix label-item-search.pl by removing CSRF > requirement > >This change converts a stateless POST into a GET, so that the paging >of the label-item-search.pl results works again. > >Test plan: >0. Apply the patch and restart Koha >1. Go to http://localhost:8081/cgi-bin/koha/labels/label-edit-batch.pl?op=new >2. Click "Add item(s)" >3. Add '05/01/2000' in "Added on or after date:" and click "Search" >4. Page through the results >5. Rejoice > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt | 5 ++--- > labels/label-item-search.pl | 2 +- > 2 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >index 37458f0f23..1136eeb238 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >@@ -19,9 +19,8 @@ > [% END %] > </h1> > >- <form name="f" method="post" action="/cgi-bin/koha/labels/label-item-search.pl"> >- [% INCLUDE 'csrf-token.inc' %] >- <input type="hidden" name="op" value="cud-do_search" /> >+ <form name="f" method="get" action="/cgi-bin/koha/labels/label-item-search.pl"> >+ <input type="hidden" name="op" value="do_search" /> > <input type="hidden" name="batch_id" value="[% batch_id | html %]" /> > <input type="hidden" name="type" value="[% type | html %]" /> > >diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl >index b949e026be..4dba30276d 100755 >--- a/labels/label-item-search.pl >+++ b/labels/label-item-search.pl >@@ -55,7 +55,7 @@ my $display_columns = [ {_add => {label => "Add Item", link_fi > {select => {label => "Select", value => "_item_number"}}, > ]; > >-if ( $op eq "cud-do_search" ) { >+if ( $op eq "do_search" ) { > $idx = $query->param('idx'); > $ccl_textbox = $query->param('ccl_textbox'); > if ( $ccl_textbox && $idx ) { >-- >2.39.2
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 36931
:
167063
|
167077
|
167158