mirror of
https://github.com/TheGrandWazoo/freenas-proxmox.git
synced 2026-10-18 22:46:39 +02:00
Fix regex operator precedence bug in API method guard
Fix regex operator precedence bug in API method guard
This commit is contained in:
@@ -466,7 +466,7 @@ sub freenas_api_call {
|
||||
syslog("info", (caller(0))[3] . " : called for host '" . $apihost . "'");
|
||||
|
||||
$method = uc($method);
|
||||
if (! $method =~ /^(?>GET|DELETE|POST)$/) {
|
||||
if ($method !~ /^(?:GET|DELETE|POST)$/) {
|
||||
syslog("info", (caller(0))[3] . " : Invalid HTTP RESTful service method '$method'");
|
||||
die "Invalid HTTP RESTful service method '$method' used.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user