oci-api-php-request-sign
oci-api-php-request-sign copied to clipboard
standardize "method" casing
in_array() is case-sensitive, so if a non-fully uppercase version of "POST", "PUT", or "PATCH" is passed in, it will fail when very likely the intended outcome is that it passes.
function shouldHashBody(string $method): bool
{
return in_array($method, ['POST', 'PUT', 'PATCH']);
}
var_dump(shouldHashBody('post')); //false
var_dump(shouldHashBody('POST')); //true
any updates?
one more bump