Issue Bug Closed

#88116TYPO3\CMS\Core\Utility\PathUtility::isAbsolutePath detection for windows environment not correct

Alexander Grein 04/09/19, 10:47 updated 12/23/19, 22:48

Description

This:

// On Windows also a path starting with a drive letter is absolute: X:/
if (Environment::isWindows() && (substr($path, 1, 2) === ':/' || substr($path, 1, 2) === ':\\')) {
    return true;
}

should be

// On Windows also a path starting with a drive letter is absolute: X:/
if (Environment::isWindows() && (substr($path, 1, 2) === ':/' || substr($path, 1, 3) === ':\\')) {
    return true;
}

Currently the second or condition will never be true.

Affected Versions:
Master, 9.5, 8.7

Reviews 2