Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.0.0
-
None
-
Untriaged
-
Unknown
-
Query-Sprint-10-03-2016
Description
- When we press the up arrow key when entering passwords, godbc captures this.
-in the even of an error we use fmt.Errorf with format as %v. This evaluates the control sequences and hence results in the following :
Ishas-MacBook-Pro:cbq isha$ ./cbq -u=Administrator -e="127.0.0.1:8091"
|
Enter Password:
|
ERROR 100 : N1QL: Connection failed Post http://Administrator:*@127.0.0.1:8091/. Error Get http://127.0.0.1:8091/pools: dial tcp 127.0.0.1:8091: getsockopt: connection refused
|
N1QL: Unable *connect to cluster endpoint http://Administrator:
|
|
Path to history file for the shell : /Users/isha/.cbq_history
|
cbq>
|
|
This is because the up arrow control characters are evaluated and the resultant string we get is
Ishas-MacBook-Pro:cbq isha$ ./cbq -u=Administrator -e="127.0.0.1:8091"
|
Enter Password:
|
|
DEBUG MESSAGE :::
|
@127.0.0.1:8091/. Error Get http://127.0.0.1:8091/pools: dial tcp 127.0.0.1:8091: getsockopt: connection refused
|
N1QL: Unable to connect to cluster endpoint http://Administrator:
|
|
DEBUG MESSAGE END ::
|
|
ERROR 100 : N1QL: Connection failed Post http://Administrator:*@127.0.0.1:8091/. Error Get http://127.0.0.1:8091/pools: dial tcp 127.0.0.1:8091: getsockopt: connection refused
|
N1QL: Unable *connect to cluster endpoint http://Administrator:
|
|
Path to history file for the shell : /Users/isha/.cbq_history
|
cbq>
|
In order to fix this, we need to escape the control characters by using %q to display string as is.