Closed
Description
Symfony version(s) affected
5.4.0, 6.0.0
Description
If an absolute path has more than one forward slashes exactly next to the Windows drive, the path is detected as not being absolute. Backward slashes are not problematic at all, and also forward slashes, except the current case.
For instance, calling Path::isAbsolute()
on 'C://users/'
will return false
, but for both 'C:/users//'
and 'C:\\\\users/'
, true
is returned.
How to reproduce
Run the following PHP codes:
Path::isAbsolute('E://test');
Path::isAbsolute('C:///windows');
Path::isAbsolute(
Path::join('C:', '\\users')
);
Possible Solution
No response
Additional Context
No response