Merge pull request #67 from Metori/master
Fixed issue with special chars in login credentials
This commit is contained in:
commit
7aac1b95e2
|
|
@ -55,7 +55,10 @@ public final class ApiConnectionImpl extends ApiConnection {
|
||||||
if (username.trim().isEmpty()) {
|
if (username.trim().isEmpty()) {
|
||||||
throw new ApiConnectionException("API username cannot be empty");
|
throw new ApiConnectionException("API username cannot be empty");
|
||||||
}
|
}
|
||||||
List<Map<String, String>> list = execute("/login name=" + username + " password=" + password);
|
Command cmd = new Command("/login");
|
||||||
|
cmd.addParameter("name", username);
|
||||||
|
cmd.addParameter("password", password);
|
||||||
|
List<Map<String, String>> list = execute(cmd, timeout);
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
Map<String, String> res = list.get(0);
|
Map<String, String> res = list.get(0);
|
||||||
if (res.containsKey("ret")) {
|
if (res.containsKey("ret")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue