Bug 36863: Deal with non-listed methods in CSRF plack middleware

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2024-05-15 14:47:30 +02:00 committed by Lucas Gass
parent 5673e13c60
commit 13e22ae52c
1 changed files with 3 additions and 0 deletions

View File

@ -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) {