Bugzilla – Attachment 171121 Details for
Bug 36598
Add CSRF protection to Mojolicious apps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36598: Fix CSRF header name (underscore -> hyphen)
Bug-36598-Fix-CSRF-header-name-underscore---hyphen.patch (text/plain), 1.04 KB, created by
Marcel de Rooy
on 2024-09-06 07:40:24 UTC
(
hide
)
Description:
Bug 36598: Fix CSRF header name (underscore -> hyphen)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-09-06 07:40:24 UTC
Size:
1.04 KB
patch
obsolete
>From 1f514dc4cba1fbe540b12ea7f8cf47ee41c96b3b Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 3 May 2024 09:17:37 +0200 >Subject: [PATCH] Bug 36598: Fix CSRF header name (underscore -> hyphen) >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/App/Plugin/CSRF.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/App/Plugin/CSRF.pm b/Koha/App/Plugin/CSRF.pm >index b24fef655a..579d0178bd 100644 >--- a/Koha/App/Plugin/CSRF.pm >+++ b/Koha/App/Plugin/CSRF.pm >@@ -91,7 +91,7 @@ C<$req> must be a Mojo::Message::Request object > sub is_csrf_valid { > my ( $self, $req ) = @_; > >- my $csrf_token = $req->param('csrf_token') || $req->headers->header('CSRF_TOKEN'); >+ my $csrf_token = $req->param('csrf_token') || $req->headers->header('CSRF-TOKEN'); > my $cookie = $req->cookie('CGISESSID'); > if ( $csrf_token && $cookie ) { > my $session_id = $cookie->value; >-- >2.30.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 36598
:
164847
|
164848
|
164870
|
165075
|
165076
|
166094
|
166634
|
166673
|
166675
|
166727
|
166728
|
166729
|
166730
|
166731
|
166732
|
166733
|
171119
|
171120
| 171121 |
171122
|
171123
|
171124
|
171125