diff --git a/Koha/Middleware/CSRF.pm b/Koha/Middleware/CSRF.pm index 88f7035c25..314c311aa6 100644 --- a/Koha/Middleware/CSRF.pm +++ b/Koha/Middleware/CSRF.pm @@ -77,6 +77,9 @@ sub call { } } } + elsif ( !exists $stateless_methods{$request_method} && !exists $stateful_methods{$request_method} ) { + $error = sprintf "unknown or unsupported method %s", $request_method; + } if ($error) {