Consider trimming whitespace on command line inputs

Description

Arguments passed to the command line client may end up including extraneous whitespace depending on how the client is invoked, which can result in unexpected behavior.

For example a user was attempting to use the below script to set annotations while looping through the a file containing one synapse ID per line. The script does not itself consume newlines/linefeeds and as a result these are passed through as part of the synapse id to the command line client, which passes these ids through when constructing the REST URL, and an error results.

Should be safe to strip various arguments throughout the command line client, but need to think about it a bit more to make sure there are no side effects.

The above can be fixed within the script by delimiting on newlines, e.g. IFS=$'\r\n'

Environment

None

Assignee

Jordan Kiang

Reporter

Jordan Kiang

Labels

None

Validator

Bruce Hoff

Development Area

Synapse Core Infrastructure

Release Version History

None

Components

Priority

Major
Configure