]> git.koha-community.org Git - koha.git/commit
Bug 36148: Allow Koha::Middleware::CSRF to use error/exception middlewares
authorDavid Cook <dcook@prosentient.com.au>
Fri, 23 Feb 2024 05:05:30 +0000 (05:05 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 1 Mar 2024 10:01:04 +0000 (11:01 +0100)
commitd3687f0b62dd1d5e83ac5cbd4a12262c5c719508
tree01adf0d5be03b6ff05c74d0dbfff6dd5d5847ec5
parent4bd4b367dd1b23c8917aa0f1b5c655d49aaae063
Bug 36148: Allow Koha::Middleware::CSRF to use error/exception middlewares

This change allows Koha::Middleware::CSRF to use the ErrorDocument and
HTTPExcetions middlewares to display the correct status codes and HTML
documents.

Leveraging Plack environmental variables, we're also able to pass along
data to the error page handlers to show warnings indicating that there
was a missing CSRF token.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Middleware/CSRF.pm
debian/templates/plack.psgi
errors/403.pl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt
opac/errors/403.pl