fix(common): ignore relative XDG directory overrides - #1795
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: unbridled-41 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @unbridled-41. Thanks for your PR. I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
6216df1 to
92659ee
Compare
Apply XDG directory environment variables only when they contain absolute paths, as required by the base directory specification. Add coverage for relative overrides and valid absolute values. Signed-off-by: 做着百万梦的鱼 <yangzihao_41@outlook.com>
92659ee to
ae37a96
Compare
Summary
Ignore relative values in XDG directory environment variables and use the existing fallback paths.
Root cause
The XDG base directory specification requires these environment variables to contain absolute paths. The current helpers accepted any non-empty value, so relative configuration could make runtime, cache, or config paths depend on the process working directory.
Changes
XDG_RUNTIME_DIR,XDG_CACHE_HOME, andXDG_CONFIG_HOMEonly when absolute.Test plan
XDGTestregression casesgit diff --check