Skip to content

Commit

Permalink
prevent empty oauth token in header
Browse files Browse the repository at this point in the history
  • Loading branch information
brentredd committed Jan 11, 2014
1 parent 0a16401 commit 3e1446a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/httpclient/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,10 @@ def challenge(uri, param_str = nil)
def calc_cred(req, config)
header = {}
header['oauth_consumer_key'] = config.consumer_key
header['oauth_token'] = config.token
header['oauth_signature_method'] = config.signature_method
header['oauth_timestamp'] = config.debug_timestamp || Time.now.to_i.to_s
header['oauth_nonce'] = config.debug_nonce || generate_nonce()
header['oauth_token'] = config.token if config.token
header['oauth_version'] = config.version if config.version
header['oauth_callback'] = config.callback if config.callback
header['oauth_verifier'] = config.verifier if config.verifier
Expand Down

0 comments on commit 3e1446a

Please sign in to comment.