-
Notifications
You must be signed in to change notification settings - Fork 18k
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
os: UserConfigDir
and UserCacheDir
should disallow relative paths in the environment variables
#68470
Comments
I'll try to make a patch for fixing this issue. |
UserConfigDir
and UserCacheDir
don't check relative paths in the environment variablesUserConfigDir
and UserCacheDir
should disallow relative paths in the environment variables
Change https://go.dev/cl/598655 mentions this issue: |
13 tasks
rsteube
added a commit
to carapace-sh/carapace
that referenced
this issue
Jan 3, 2025
needs: golang/go#68470
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go version
go version go1.22.5 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Run the following code by
go run
.And run the following code too.
What did you see happen?
Both codes panicked:
What did you expect to see?
Both codes should not panic.
os.UserConfigDir
andos.UserCacheDir
should return errors when the corresponding XDG environment variables contain relative paths.The documens are saying that
However, XDG Base Directory Specification is saying that
So
os.UserConfigDir
andos.UserCacheDir
don't conform the specification.The text was updated successfully, but these errors were encountered: