Skip to content

Commit

Permalink
Fix path normalisation in Dancer::FileUtils
Browse files Browse the repository at this point in the history
This solves a potential directory traversal issue allowing static files to be
served from a level above the public/ dir, which could be dangerous.

Thanks to Vladimir Lettiev aka crux for reporting this regression.
  • Loading branch information
bigpresh committed Jul 26, 2011
1 parent 49ca988 commit 75a47c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Dancer/FileUtils.pm
Expand Up @@ -103,6 +103,7 @@ sub normalize_path {

$path =~ s{/\./}{/}g;
$path =~ s{$seqregex}{}g;
$path =~ s{$seqregex}{};

return $path;
}
Expand Down

0 comments on commit 75a47c0

Please sign in to comment.