src/Util/UrlUtil.php
public static function isPossiblePathTraversalAttack($path)
    {
        $virtualBase = '/' . md5(microtime(true) . '/' . mt_rand());
        $virtualPath = $virtualBase . '/' . ltrim($path, '/');

        return !FileUtil::isBasePath($virtualPath, $virtualBase);
    }
public static function isPossiblePathTraversalAttack($path)
    {
        $virtualBase = '/' . md5(microtime(true) . '/' . mt_rand());
        $virtualPath = $virtualBase . '/' . ltrim($path, '/');

        return !FileUtil::isBasePath($virtualPath, $virtualBase);
    }
public static function isPossiblePathTraversalAttack ( $ path ) { $ virtualBase = '/' . md5 ( microtime ( true ) . '/' . mt_rand ( ) ) ; $ virtualPath = $ virtualBase . '/' . ltrim ( $ path , '/' ) ; return ! FileUtil :: isBasePath ( $ virtualPath , $ virtualBase ) ; }
Returns true if the given path will leave the root directory
@param $path
@return bool
Returns true if the given path will leave the root directory