Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fixing AWS.BadClaimsSupplied error #1454

Open
wants to merge 1 commit into from

2 participants

@toastdriven toastdriven commented on the diff
boto/auth.py
((10 lines not shown))
for key in keys:
- hmac.update(key)
+ #hmac1.update(key)

Why did this line get changed & then commented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@toastdriven toastdriven commented on the diff
boto/auth.py
((13 lines not shown))
val = boto.utils.get_utf8_value(params[key])
- hmac.update(val)
+ #hmac1.update(val)

Same, I don't understand the commenting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@toastdriven

Thanks for the pull request. Given that this is a change in signing (& the broad impact that can have), we need tests for this before it can be merged. It'd be awesome if you had time to add them, otherwise it'll have to wait until a core dev has time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 22, 2013
  1. @kimsterv
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 4 deletions.
  1. +9 −4 boto/auth.py
View
13 boto/auth.py
@@ -559,17 +559,22 @@ def __init__(self, *args, **kw):
def _calc_signature(self, params, *args):
boto.log.debug('using _calc_signature_1')
- hmac = self._get_hmac()
+ hmac1 = self._get_hmac()
keys = params.keys()
keys.sort(cmp=lambda x, y: cmp(x.lower(), y.lower()))
pairs = []
+ sign_vals=[]
for key in keys:
- hmac.update(key)
+ #hmac1.update(key)

Why did this line get changed & then commented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
val = boto.utils.get_utf8_value(params[key])
- hmac.update(val)
+ #hmac1.update(val)

Same, I don't understand the commenting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
pairs.append(key + '=' + urllib.quote(val))
+ sign_vals.append(key+val)
qs = '&'.join(pairs)
- return (qs, base64.b64encode(hmac.digest()))
+ signstring="".join(sign_vals)
+ new_h=hmac.new(self._provider.secret_key,signstring,sha)
+ boto.log.debug('signstring:\n%s' % signstring)
+ return (qs, base64.encodestring(new_h.digest()).strip())
class QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler):
Something went wrong with that request. Please try again.