fixed: assets can have urls with /./ or /../ in them, making them inaccessible
This commit is contained in:
parent
36a0ebf425
commit
4636041f5e
2 changed files with 6 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
|||
- removed hardcoding of administer.js and survey.css hardcoded extras paths.
|
||||
- fixed: Error message when you try to send a message from the Inbox, but none of your friends allow private messaging.
|
||||
- fixed: Images uploaded to a Story should all be the same width so the YUI carousel does not break.
|
||||
- fixed: assets can have urls with /./ or /../ in them, making them inaccessible
|
||||
|
||||
7.7.9
|
||||
- fixed #10266: Public Profile overrides Able to be friend
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue