fixed: assets can have urls with /./ or /../ in them, making them inaccessible

This commit is contained in:
Graham Knop 2009-06-10 00:42:37 +00:00
parent 36a0ebf425
commit 4636041f5e
2 changed files with 6 additions and 0 deletions

View file

@ -529,6 +529,11 @@ sub urlize {
my ($value);
$value = lc(shift); #lower cases whole string
$value = $self->makeCompliant($value);
# remove /./ or /../
$value =~ s{(^|/)\.\.?/}{$1};
# remove trailing slashes
$value =~ s/\/$//;
return $value;
}