From 3e90c5517e7e18fb0e548a4013e6c70d78e86c9f Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 23 Feb 2024 05:15:24 +0000 Subject: [PATCH] Bug 36148: Add explanatory notes Signed-off-by: Jonathan Druart --- Koha/Middleware/CSRF.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/Middleware/CSRF.pm b/Koha/Middleware/CSRF.pm index 890f55ae79..c9a30c97ba 100644 --- a/Koha/Middleware/CSRF.pm +++ b/Koha/Middleware/CSRF.pm @@ -69,6 +69,9 @@ sub call { } } + #NOTE: It is essential to check for this environmental variable. + #NOTE: If we don't check for it, then we'll also throw an error for the "subrequest" that ErrorDocument uses to + #fetch the error page document. Then we'll wind up with a very ugly error page and not our pretty one. if ( $error && !$env->{'plack.middleware.Koha.CSRF'} ) { #NOTE: Other Middleware will take care of logging to correct place, as Koha::Logger doesn't know where to go here -- 2.39.5