amazon-ecs-agent icon indicating copy to clipboard operation
amazon-ecs-agent copied to clipboard

Fixes bug in FSx when password has special characters

Open jterry75 opened this issue 2 years ago • 1 comments

Summary

When a password contains characters that contain escape sequences such as a quotation mark PowerShell fails the command. Rather than passing on the cmdline directly we read the password from a file which allows it to contain any character sequence.

Ref: https://github.com/aws/amazon-ecs-agent/issues/3270

Implementation details

We now specifically write the raw password to a temporary file that allows PowerShell to read the text directly rather than interpret the text.

Testing

Deployed instance on ec2 with private ecs agent. Ran a task Windows task with FSx share and validated that it successfully runs.

New tests cover the changes: no

Description for the changelog

Fixed an issue in FSx Windows shares when the password contains special characters such as a ".

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jterry75 avatar Jul 12 '22 20:07 jterry75

Dont merge yet plz. Following up on this today/tomorrow

jterry75 avatar Aug 16 '22 19:08 jterry75

I'm going to close this for now, feel free to reopen with updates once the bugfix is ready, thanks!

sparrc avatar Jan 17 '23 22:01 sparrc