Merge pull request #10 from sokac/master

Fix slash escape in REST API path
This commit is contained in:
Andrew Rabert 2017-04-13 13:51:14 -04:00 committed by GitHub
commit d9239a3456
1 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,8 @@ public final class Util {
String username = prefs.getString(Constants.PREFERENCES_KEY_USERNAME + instance, null); String username = prefs.getString(Constants.PREFERENCES_KEY_USERNAME + instance, null);
String password = prefs.getString(Constants.PREFERENCES_KEY_PASSWORD + instance, null); String password = prefs.getString(Constants.PREFERENCES_KEY_PASSWORD + instance, null);
builder.addPathSegment("rest/" + method + ".view"); builder.addPathSegment("rest");
builder.addPathSegment(method + ".view");
int hash = (username + password).hashCode(); int hash = (username + password).hashCode();
Pair<String, String> values = tokens.get(hash); Pair<String, String> values = tokens.get(hash);