-
Notifications
You must be signed in to change notification settings - Fork 652
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
Windows: credential_process cannot handle paths denoted with backslashes #2273
Comments
@jordankay13 -- Do escaped backslashes exhibit the same issue? e.g.
|
It looks like escaped backslashes also fails -- Using forward slashes works though ( |
I have some more context into this after recently re-writing the entire ini parser in #2365. This manual escaping of As it so happens, in the aforementioned refactor I unintentionally removed part of that behavior. As of the current version we now only escape Normally we're opposed to making changes like this - https://www.hyrumslaw.com/ - but I'm reconsidering here given that there was no apparent fallout from the partial removal. |
Will be resolved by #2461 |
|
Describe the bug
On Windows, when using
credential_process
, the executable cannot be contained in a folder that starts witht
orn
when using backslashes in the path.For example:
This will fail with the error:
Expected Behavior
I expected my executable in the
tools
folder to be executed to fetch my AWS credentials:Current Behavior
Folders beginning with
t
orn
are treated as tabs or newlines when using backslashes.In fact, the example path in these docs for Windows would hit this bug:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html
because "C:\Path\To\credentials.cmd" would be corrupted at the To folder.
Reproduction Steps
Setup your credentials file similar to:
I don't have a program that I've written for this -- I'm just using an OpenTelemetry Collector, and it's written in Go:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/awskinesisexporter/exporter.go#L60
The premise is that the call to
config.LoadDefaultConfig
with the above credentials file results in the error.Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2/config v1.18.38
Compiler and Version used
1.20.8
Operating System and version
Windows
The text was updated successfully, but these errors were encountered: