Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#8051] Fix issue that caused breakage in modFileMediaSource
- Loading branch information
Shaun McCormick
committed
Jun 14, 2012
1 parent
c286e64
commit 975675e
Showing
1 changed file
with
3 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
975675e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in row #116 (red color) change place variable $from and $path, like that:
while (stristr($path,$from)) {
Thus the function:
public function sanitizePath($path) {
$replace = array('../' => '', './' => '', '' => '/', '//' => '/');
foreach ($replace as $from => $to) {
while (stristr($path,$from)) {
$path = str_replace($from,$to,$path);
}
}
return $path;
}
work normally
975675e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was solved without the recursion necessary; see 10248d0#L1R114