fix urls: Escape values in URLs
For usernames and passwords containing special characters the URL parameters must be escaped. Because the entire URI is just query parameters I've opted for using net/url.Values for the entire URI. Fixes #1
This commit is contained in:
parent
7824e0e7e3
commit
6dcb0f4b2b
2 changed files with 25 additions and 6 deletions
1
main.go
1
main.go
|
|
@ -62,6 +62,7 @@ func readCredentials() (string, string, error) {
|
|||
|
||||
fmt.Printf("Password: ")
|
||||
password, err := terminal.ReadPassword(syscall.Stdin)
|
||||
fmt.Println()
|
||||
|
||||
// If an error occured, I don't care about which one it is.
|
||||
return strings.TrimSpace(username), strings.TrimSpace(string(password)), err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue