Bugzilla – Attachment 166094 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), 908 bytes, created by
Julian Maurice
on 2024-05-03 07:18:01 UTC
(
hide
)
Description:
Bug 36598: Fix CSRF header name (underscore -> hyphen)
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-05-03 07:18:01 UTC
Size:
908 bytes
patch
obsolete
>From 946714cf4a4f68e8b0a88eb2acc3ccf13e456d89 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) > >--- > 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