Collaborator 13.2 and 13.4 cannot login in the command line if the password contains a double-quote
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Collaborator 13.2 and 13.4 cannot login in the command line if the password contains a double-quote
Any time the password contains a double-quote, the login command below raises an exception.
Example: if the password is 123"456, then the login command must be:
java.io.IOException: Network is unreachable: connect
com.smartbear.collaborator.client.exceptions.CollabClientException: java.io.IOException: Network is unreachable: connect
Connecting to Collaborator Enterprise v13.4.13401 Server https://collabserver.io
Collaborator Enterprise client credentials invalid. Please supply a valid password.
This situation was not present in version 12.4, the double-quote was accepted in the password!
- Labels:
-
Command-line Client
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try surrounding the password with *single* quotes.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And what if the password contains a single-quote and a double-quote, like this: 123"4'56 ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This isn't a Collaborator problem . . . it is a Windows CMD shell problem. You will have a problem with other characters as well (like caret ^ and ampersand & and percent %). There doesn't seem to be a simple clean way to do this.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A command line with arguments is not necessarily executed in a cmd.exe window where escaping restrictions apply for & % ^ " etc.
I can execute the ccollab.exe login command with Win32 API functions or with C# process launching functions, or with Python or Java.
In these languages, no escaping restrictions are necessary, except those required by the language and the use of two double-quotes for escaping a single double-quote inside an argument.
Because the arguments are always (normally?) passed to executables surrounded by double-quotes, aren't they?
What are the new rules of passing arguments to the ccollab.exe login command in Collaborator since 13.2?
I think it is Collaborator's responsibility to define the rules of passing arguments to its commands.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At our company we have no Collaborator 12.4 server anymore to test, we have upgraded to 13.4.13104, but I can guarantee that the command below worked perfectly fine in 12.4:
ccollab.exe login https://collabserver.io Matei "123""456"
And now starting with 13.2 the command raises a weird exception.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This command also crashes starting from Collaborator 13.2.
Why ? It contains only single quotes, the last argument is perfectly valid.
ccollab.exe login https://collabserver.io Matei 123'4'56
Trying to login with new configurationjava.net.SocketException: Network is unreachable: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
ERROR: Executing command `ccollab login`:
java.io.IOException: Network is unreachable: connect
com.smartbear.collaborator.client.exceptions.CollabClientException: java.io.IOException: Network is unreachable: connect
