diff options
Diffstat (limited to 'main/src/cgeo/geocaching/network/OAuth.java')
| -rw-r--r-- | main/src/cgeo/geocaching/network/OAuth.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/network/OAuth.java b/main/src/cgeo/geocaching/network/OAuth.java index c033660..fa376af 100644 --- a/main/src/cgeo/geocaching/network/OAuth.java +++ b/main/src/cgeo/geocaching/network/OAuth.java @@ -37,13 +37,14 @@ public class OAuth { } final String keysPacked = consumerSecret + "&" + StringUtils.defaultString(tokenSecret); // both even if empty some of them! - final String requestPacked = method + "&" + OAuth.percentEncode((https ? "https" : "http") + "://" + host + path) + "&" + OAuth.percentEncode(StringUtils.join(paramsEncoded.toArray(), '&')); + final @NonNull String joinedParams = StringUtils.join(paramsEncoded.toArray(), '&'); + final String requestPacked = method + "&" + OAuth.percentEncode((https ? "https" : "http") + "://" + host + path) + "&" + OAuth.percentEncode(joinedParams); params.put("oauth_signature", CryptUtils.base64Encode(CryptUtils.hashHmac(requestPacked, keysPacked))); } /** * percent encode following http://tools.ietf.org/html/rfc5849#section-3.6 - * + * * @param url * @return */ |
