code/libraries/joomlatools/library/template/locator/file.php
public function realPath($file)
    {
        $path = parent::realPath($file);

        if($base = $this->getBasePath())
        {
            if(strpos($file, $base) !== 0) {
                return false;
            }
        }

        return $path;
    }
public function realPath($file)
    {
        $path = parent::realPath($file);

        if($base = $this->getBasePath())
        {
            if(strpos($file, $base) !== 0) {
                return false;
            }
        }

        return $path;
    }
public function realPath ( $ file ) { $ path = parent :: realPath ( $ file ) ; if ( $ base = $ this -> getBasePath ( ) ) { if ( strpos ( $ file , $ base ) !== 0 ) { return false ; } } return $ path ; }
Prevent directory traversal attempts outside of the base path

@param  string $file The file path
@return string The real file path
Prevent directory traversal attempts outside of the base path