Bugzilla – Attachment 162428 Details for
Bug 36148
Move CSRF check code outside of CGI->new
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36148: Do not deal with CSRF error in get_template_and_user
Bug-36148-Do-not-deal-with-CSRF-error-in-gettempla.patch (text/plain), 1.10 KB, created by
Jonathan Druart
on 2024-02-26 10:32:27 UTC
(
hide
)
Description:
Bug 36148: Do not deal with CSRF error in get_template_and_user
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-02-26 10:32:27 UTC
Size:
1.10 KB
patch
obsolete
>From b0d8b61bc1a115a214874f603d720a94aac05965 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Feb 2024 11:29:17 +0100 >Subject: [PATCH] Bug 36148: Do not deal with CSRF error in > get_template_and_user > >We deal with that in the middleware, we don't want 403.pl to early exit. >If we notice that we actually need it (for other scripts), we could >eventually add a new flag to get_template_and_user to skip the CSRF check, >or build the template without using get_template_and_user for errors/* >scripts. >--- > C4/Auth.pm | 4 ---- > 1 file changed, 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 05bb1be0f45..22ac2a467bf 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -640,10 +640,6 @@ sub get_template_and_user { > $template->param( logged_in_user => $patron ); > $template->param( sessionID => $sessionID ); > >- if ( $ENV{'plack.middleware.Koha.CSRF'} ) { >- C4::Output::output_and_exit( $in->{query}, $cookie, $template, $ENV{'plack.middleware.Koha.CSRF'} ); >- } >- > return ( $template, $borrowernumber, $cookie, $flags ); > } > >-- >2.34.1
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 36148
:
162333
|
162336
|
162359
|
162360
|
162362
|
162363
|
162428
|
162505
|
162506
|
162507
|
162508
|
162509
|
162510