Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Filesystem] Path::isAbsolute() returns false if repetitive forward slashes are encountered exactly after driver for Windows paths #45485

Copy link
Copy link
Closed
@machitgarha

Description

@machitgarha
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.