Also clean relative paths in cleanPath()

This commit is contained in:
Kijin Sung 2016-03-15 14:14:50 +09:00
parent f983335833
commit 139e11df13
2 changed files with 15 additions and 0 deletions

View file

@ -55,6 +55,10 @@ class FilenameFilter
*/
public static function cleanPath($path)
{
if (!preg_match('@^(?:[a-z]:[\\\\/]|\\\\|/)@i', $path))
{
$path = \RX_BASEDIR . $path;
}
$path = str_replace('\\', '/', $path);
$path = preg_replace('@[\?#].+$@', '', $path);
$path = preg_replace('@/{2,}@', '/', $path);

View file

@ -0,0 +1,11 @@
<?php
namespace Rhymix\Framework;
/**
* The storage class.
*/
class Storage
{
}