english/libraries/joomla/filesystem/path.php
/**
	 * Checks for snooping outside of the file system root
	 *
	 * @param   string   $path  A file system path to check
	 * @param   string   $ds    Directory separator (optional)
	 *
	 * @return  string  A cleaned version of the path or exit on error
	 * @since   11.1
	 */
Checks for snooping outside of the file system root
@param   string   $path  A file system path to check
@param   string   $ds    Directory separator (optional)

@return  string  A cleaned version of the path or exit on error
@since   11.1
Checks for snooping outside of the file system root @param string $path A file system path to check @param string $ds Directory separator ( optional ) @return string A cleaned version of the path or exit on error @since 11 . 1
public static function check($path, $ds = DIRECTORY_SEPARATOR)
	{
		if (strpos($path, '..') !== false) {
			JError::raiseError(20, 'JPath::check Use of relative paths not permitted');
			jexit();
		}
		$path = JPath::clean($path);
		if (strpos($path, JPath::clean(JPATH_ROOT)) !== 0) {
			JError::raiseError(20, 'JPath::check Snooping out of bounds @ '.$path);
			jexit();
		}
		return $path;
	}
public static function check ( $ path , $ ds = DIRECTORY_SEPARATOR ) { if ( strpos ( $ path , '..' ) !== false ) { JError :: raiseError ( 20 , 'JPath::check Use of relative paths not permitted' ) ; jexit ( ) ; } $ path = JPath :: clean ( $ path ) ; if ( strpos ( $ path , JPath :: clean ( JPATH_ROOT ) ) !== 0 ) { JError :: raiseError ( 20 , 'JPath::check Snooping out of bounds @ ' . $ path ) ; jexit ( ) ; } return $ path ; }
Checks for snooping outside of the file system root
 @param   string   $path  A file system path to check
 @param   string   $ds    Directory separator (optional)
Checks for snooping outside of the file system root @param string $path A file system path to check @param string $ds Directory separator ( optional )
// Don't translate // Don't translate