Bugzilla – Attachment 167620 Details for
Bug 37040
ErrorDocument accidentally setting off CSRF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37040: (RMaint follow-up) Restore passing CSRF error
Bug-37040-RMaint-follow-up-Restore-passing-CSRF-er.patch (text/plain), 1.05 KB, created by
Martin Renvoize (ashimema)
on 2024-06-11 10:37:31 UTC
(
hide
)
Description:
Bug 37040: (RMaint follow-up) Restore passing CSRF error
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-11 10:37:31 UTC
Size:
1.05 KB
patch
obsolete
>From 8cd6b4350441225b43fd5428ccaa3e7dbe6d9883 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 11 Jun 2024 11:30:22 +0100 >Subject: [PATCH] Bug 37040: (RMaint follow-up) Restore passing CSRF error > >This patch restores the plack.middleware.Koha.CSRF plack env setting to >allow passing to the errorDocument. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Middleware/CSRF.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Middleware/CSRF.pm b/Koha/Middleware/CSRF.pm >index 5d4216e5f08..88f7035c25a 100644 >--- a/Koha/Middleware/CSRF.pm >+++ b/Koha/Middleware/CSRF.pm >@@ -82,6 +82,7 @@ sub call { > > #NOTE: Other Middleware will take care of logging to correct place, as Koha::Logger doesn't know where to go here > warn $error; >+ $env->{'plack.middleware.Koha.CSRF'} = $error if !$env->{'plack.middleware.Koha.CSRF'}; > my $res = Plack::Response->new( 403, [ 'Content-Type' => 'text/plain' ], ["Wrong CSRF token"] ); > return $res->finalize; > } >-- >2.45.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 37040
:
167521
|
167560
|
167571
|
167572
| 167620