summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-04-01 11:55:58 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-04-01 11:55:58 +0000
commitc9a15200f08d40443768813760b23b2bc9925bf4 (patch)
treef6507a540c9b73bcfab977af47e5903c99c41bf0 /src
parent2e632b8f61b7ad032845186874498d2c8bc356ef (diff)
Fix OAuth signature computation in OTP R14B02
In OTP versions prior to R14B02, the OAuth signature was correctly calculated due to a bug in the OTP stdlib. This was fixed in R14B02 (OTP-8989, check http://erlang.org/download/otp_src_R14B02.readme). Before R14B02: Erlang R14B01 (erts-5.8.2) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.8.2 (abort with ^G) 1> lists:flatten(io_lib:format("%~2.1.0s", [erlang:integer_to_list($+, 16)])). "%2B" In R14B02: Erlang R14B02 (erts-5.8.3) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.8.3 (abort with ^G) 1> lists:flatten(io_lib:format("%~2.1.0s", [erlang:integer_to_list($+, 16)])). "%02" This doesn't affect the erlang-oauth application in trunk, since it's a more recent version with a different implementation. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1087661 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/erlang-oauth/oauth_uri.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/erlang-oauth/oauth_uri.erl b/src/erlang-oauth/oauth_uri.erl
index fb27ae72..3bdc9076 100644
--- a/src/erlang-oauth/oauth_uri.erl
+++ b/src/erlang-oauth/oauth_uri.erl
@@ -84,5 +84,5 @@ encode([], Encoded) ->
encode([C|Etc], Encoded) when ?is_unreserved(C) ->
encode(Etc, [C|Encoded]);
encode([C|Etc], Encoded) ->
- Value = io_lib:format("%~2.1.0s", [erlang:integer_to_list(C, 16)]),
+ Value = io_lib:format("%~2.2.0s", [erlang:integer_to_list(C, 16)]),
encode(Etc, [Value|Encoded]).