Browse Source

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.
master 0.2
Holger Weiss 10 months ago
parent
commit
c4d3486b12
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      upload.pm

+ 1
- 1
upload.pm View File

@ -81,7 +81,7 @@ sub handle_put {
my $uri = $r->uri =~ s|(?:/[^/]+){$uri_prefix_components}/||r;
my $provided_hmac;
if ($r->args =~ /v=([[:xdigit:]]{64})/) {
if (defined($r->args) and $r->args =~ /v=([[:xdigit:]]{64})/) {
$provided_hmac = $1;
} else {
$r->log_error(0, 'Rejecting upload: No auth token provided');


Loading…
Cancel
Save