-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Filesystem] Path::isAbsolute() returns false if repetitive forward slashes are encountered exactly after driver for Windows paths #45485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@machitgarha in Path.php they are striping the If not, I can make a PR to remove that striping and return true if we have PS: |
@JabriAbdelilah, I don't think so. What I think is |
Hey, thanks for your report! |
The bug is still relevant. I've not found a workaround yet. |
Hey, thanks for your report! |
Still relevant. |
Hey, thanks for your report! |
Friendly reminder that this issue exists. If I don't hear anything I'll close this. |
Friendly response, not fixed yet. |
Would you like to give a fix a try? The issue won't fix itself by keeping it open ;) |
Umm... Maybe later, 'cause it's been a long time since encountering the issue (almost one year). But... The issue should be open as long as it is unresolved, shouldn't it? |
Can you confirm that #54759 fixes this? |
…ive letters (xabbuh) This PR was merged into the 5.4 branch. Discussion ---------- [Filesystem] better distinguish URL schemes and Windows drive letters | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #45485 | License | MIT Commits ------- f456e75 better distinguish URL schemes and windows drive letters
@xabbuh, yes, the added test (if passed) shows it's fixed. Thanks. :) |
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 returnfalse
, but for both'C:/users//'
and'C:\\\\users/'
,true
is returned.How to reproduce
Run the following PHP codes:
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: