-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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
path/filepath: regression in filepath.VolumeName #64101
Comments
ncw
added a commit
to rclone/rclone
that referenced
this issue
Nov 13, 2023
In ths security related issue the go1.21.4 stdlib changed the parsing of volume names on Windows. golang/go#63713 This had the consequences of breaking the MkdirAll tests which were looking for specific error messages which changed and using invalid paths. In particular under go1.21.3: filepath.VolumeName(`\\?\C:`) == `\\?\C:` But under go1.21.4 it is: filepath.VolumeName(`\\?\C:`) == `\\?` The path `\\?\C:` isn't actually a valid Windows path. I reported this as a FYI bug upstream - I'm not expecting it to be fixed. See: golang/go#64101
Duplicate of #64028 |
ncw
added a commit
to rclone/rclone
that referenced
this issue
Nov 14, 2023
In ths security related issue the go1.21.4 stdlib changed the parsing of volume names on Windows. golang/go#63713 This had the consequences of breaking the MkdirAll tests which were looking for specific error messages which changed and using invalid paths. In particular under go1.21.3: filepath.VolumeName(`\\?\C:`) == `\\?\C:` But under go1.21.4 it is: filepath.VolumeName(`\\?\C:`) == `\\?` The path `\\?\C:` isn't actually a valid Windows path. I reported this as a FYI bug upstream - I'm not expecting it to be fixed. See: golang/go#64101
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (with the latest stable release).
What operating system and processor architecture are you using (
go env
)?I've been cross compiling on Linux and running on my Windows 10 VM. This also fails on Github CI.
What did you do?
I compiled and ran this program
What did you expect to see?
I expected it to print
\\?\C:
like it does under go1.21.3What did you see instead?
However it prints
\\?
under go1.21.4Discussion
I noticed this regression when github CI upgraded from go1.21.3 to go1.21.4
I used
git bisect
to discover the commit that breaks the tests is this one by @neild9e933c1 - path/filepath: fix various issues in parsing Windows paths
I think
\\?\C:
is not a valid path in Windows, at least I get this under CMDThis issue is probably only of academic interest since
\\?\C:
is not a valid Windows path, but I'm reporting it as a FYI - feel free to close!The text was updated successfully, but these errors were encountered: