forked from indymedia/epicyon
More debug
parent
a3e7b0ed53
commit
73ebebdcd1
14
httpsig.py
14
httpsig.py
|
@ -191,11 +191,17 @@ def verifyPostHeaders(httpPrefix: str,publicKeyPem: str,headers: dict, \
|
|||
#print('***************************Verify digest: SHA-256='+bodyDigest)
|
||||
#print('***************************Verify messageBodyJsonStr: '+messageBodyJsonStr)
|
||||
elif signedHeader == 'content-length' or signedHeader == 'Content-Length':
|
||||
if int(headers[signedHeader])!=contentLength:
|
||||
if headers.get(signedHeader):
|
||||
if int(headers[signedHeader])!=contentLength:
|
||||
if debug:
|
||||
print('DEBUG: verifyPostHeaders content-length does not match '+headers[signedHeader]+' != '+str(contentLength))
|
||||
return False
|
||||
if debug:
|
||||
print('DEBUG: verifyPostHeaders content-length does not match '+headers[signedHeader]+' != '+str(contentLength))
|
||||
return False
|
||||
signedHeaderList.append(f'content-length: {headers[signedHeader]}')
|
||||
print('DEBUG: verifyPostHeaders adding content-length to signedHeaderList')
|
||||
signedHeaderList.append(f'content-length: {headers[signedHeader]}')
|
||||
else:
|
||||
if debug:
|
||||
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers))
|
||||
else:
|
||||
if headers.get(signedHeader):
|
||||
if signedHeader=='date':
|
||||
|
|
Loading…
Reference in New Issue