Skip to content

Multiple issues with special characters in passwords #124

@amhuber

Description

@amhuber
  1. The following template entries are not shell escaping passwords:

https://github.com/cloudfoundry-incubator/diego-release/blob/develop/jobs/route_emitter/templates/route_emitter_ctl.erb#L42

https://github.com/cloudfoundry-incubator/diego-release/blob/develop/jobs/ssh_proxy/templates/ssh_proxy_ctl.erb#L62

  1. In addition, the ssh_proxy secret would probably fail if there was a "@" in it from looking at the code, it may need to be URL encoded in the config as well. Automated tests need to be improved to actually test special characters in all passwords.

  2. We also had a problem with cc_uploader not working when there is a special character in the staging_upload_password in the Cloud Controller config. When looking at the upload POST sent by DEA the password is URL encoded (before being Base64 encoded) but this is not being done by cc_uploader. My guess is that if URL encoding is added to this line it might fix the problem but testing would be needed:

https://github.com/cloudfoundry-incubator/cc-uploader/blob/master/ccclient/uploader.go#L44

In our test case a "$" in the password caused it to break during staging with an upload error, and when testing with an "@" and "!" in the password, part of the password was actually returned to the client in the error message:

Server error, status code: 500, error code: 170011, message: Stager error: bad component(expected user component): <passwordhere>!!(MISSING)!(MISSING)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions