-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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. |
seankhliao
changed the title
os:
os: Jul 16, 2024
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: |
seankhliao
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Jul 16, 2024
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Jul 22, 2024
13 tasks
rsteube
added a commit
to carapace-sh/carapace
that referenced
this issue
Jan 3, 2025
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: