Bugzilla – Attachment 166729 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), 966 bytes, created by
Victor Grousset/tuxayo
on 2024-05-14 18:40:24 UTC
(
hide
)
Description:
Bug 36598: Fix CSRF header name (underscore -> hyphen)
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-05-14 18:40:24 UTC
Size:
966 bytes
patch
obsolete
>From efab401f24120607e9cfd92a1a4963bb2f116759 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) > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > 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.45.0
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