Bugzilla – Attachment 162510 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.16 KB, created by
Nick Clemens (kidclamp)
on 2024-02-27 15:19:38 UTC
(
hide
)
Description:
Bug 36148: Do not deal with CSRF error in get_template_and_user
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-02-27 15:19:38 UTC
Size:
1.16 KB
patch
obsolete
>From a6479ba1596969bfc69587251d6ea418271186e7 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. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Auth.pm | 4 ---- > 1 file changed, 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 9c4c7842e68..44af94f33d2 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.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 36148
:
162333
|
162336
|
162359
|
162360
|
162362
|
162363
|
162428
|
162505
|
162506
|
162507
|
162508
|
162509
| 162510