Bugzilla – Attachment 169470 Details for
Bug 19316
Items should have sort1 and sort2 fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19316: Add CSRF protection
Bug-19316-Add-CSRF-protection.patch (text/plain), 4.03 KB, created by
Matt Blenkinsop
on 2024-07-24 10:20:01 UTC
(
hide
)
Description:
Bug 19316: Add CSRF protection
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-24 10:20:01 UTC
Size:
4.03 KB
patch
obsolete
>From 5b155ada780f89fe05abaaa7e364633ee45cd15f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 10 May 2024 15:09:21 +0000 >Subject: [PATCH] Bug 19316: Add CSRF protection > >Signed-off-by: baptiste <baptiste.bayche@inlibro.com> >--- > catalogue/updateitem.pl | 4 ++-- > .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 6 ++++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl >index 64bc6b26827..8718653b38a 100755 >--- a/catalogue/updateitem.pl >+++ b/catalogue/updateitem.pl >@@ -82,9 +82,9 @@ elsif ( $op eq "cud-set_public_note" ) { # i.e., itemnotes parameter passed from > $item->bookable($bookable); > } elsif ( $op eq "cud-set_damaged" && $damaged ne $item_data_hashref->{'damaged'}) { > $item->damaged($damaged); >-} elsif ( $op eq "set_sort1" && $sort1 ne $item_data_hashref->{'sort1'} ) { >+} elsif ( $op eq "cud-set_sort1" && $sort1 ne $item_data_hashref->{'sort1'} ) { > $item->sort1($sort1); >-} elsif ( $op eq "set_sort2" && $sort2 ne $item_data_hashref->{'sort2'} ) { >+} elsif ( $op eq "cud-set_sort2" && $sort2 ne $item_data_hashref->{'sort2'} ) { > $item->sort2($sort2); > } else { > #nothings changed, so do nothing. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index db9e8b10ade..232b1c68368 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -386,8 +386,9 @@ > <span class="label">Sort 1:</span> > [% IF ( CAN_user_editcatalogue_edit_items ) %] > <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" /> >+ [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" /> >- <input type="hidden" name="op" value="set_sort1" /> >+ <input type="hidden" name="op" value="cud-set_sort1" /> > <textarea name="sort1" rows="2" cols="30">[% ITEM_DAT.sort1 | html %]</textarea><input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" /> > </form> > [% ELSE %] >@@ -398,8 +399,9 @@ > <span class="label">Sort 2:</span> > [% IF ( CAN_user_editcatalogue_edit_items ) %] > <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" /> >+ [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" /> >- <input type="hidden" name="op" value="set_sort2" /> >+ <input type="hidden" name="op" value="cud-set_sort2" /> > <textarea name="sort2" rows="2" cols="30">[% ITEM_DAT.sort2 | html %]</textarea><input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" /> > </form> > [% ELSE %] >-- >2.39.3 (Apple Git-146)
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 19316
:
154963
|
154964
|
154965
|
154966
|
154967
|
166298
|
166299
|
166300
|
166301
|
166578
|
166593
|
169466
|
169467
|
169468
|
169469
|
169470
|
169503
|
169504
|
169505
|
169506
|
169507