Allow parenthesises in the file name.
[pr0n] / perl / Sesse / pr0n / WebDAV.pm
index 25b4408705c0c17bd9261a150454b52e693cfb01..8f30b7a0074d64052fc839c2b6190c10aaf88108 100644 (file)
@@ -408,9 +408,9 @@ EOF
                my $orig_filename = $filename;
 
                # Remove evil characters
-               if ($filename =~ /[^a-zA-Z0-9._-]/) {
+               if ($filename =~ /[^a-zA-Z0-9._()-]/) {
                        if (defined($autorename) && $autorename eq "autorename/") {
-                               $filename =~ tr/a-zA-Z0-9.-/_/c;
+                               $filename =~ tr/a-zA-Z0-9.()-/_/c;
                        } else {
                                $r->status(403);
                                $r->content_type('text/plain; charset=utf-8');