Don't stumble over undefined request arguments
Don't yield an "unitialized value" error if Nginx didn't define the method that returns the request arguments.
This commit is contained in:
parent
bc00eeec60
commit
c4d3486b12
|
@ -81,7 +81,7 @@ sub handle_put {
|
||||||
my $uri = $r->uri =~ s|(?:/[^/]+){$uri_prefix_components}/||r;
|
my $uri = $r->uri =~ s|(?:/[^/]+){$uri_prefix_components}/||r;
|
||||||
my $provided_hmac;
|
my $provided_hmac;
|
||||||
|
|
||||||
if ($r->args =~ /v=([[:xdigit:]]{64})/) {
|
if (defined($r->args) and $r->args =~ /v=([[:xdigit:]]{64})/) {
|
||||||
$provided_hmac = $1;
|
$provided_hmac = $1;
|
||||||
} else {
|
} else {
|
||||||
$r->log_error(0, 'Rejecting upload: No auth token provided');
|
$r->log_error(0, 'Rejecting upload: No auth token provided');
|
||||||
|
|
Loading…
Reference in New Issue