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>
(cherry picked from commit 8cd6b43504)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e708597417
commit
647d5e9a9e
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue