mirror of https://gitlab.com/bashrc2/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 digest: SHA-256='+bodyDigest)
|
||||||
#print('***************************Verify messageBodyJsonStr: '+messageBodyJsonStr)
|
#print('***************************Verify messageBodyJsonStr: '+messageBodyJsonStr)
|
||||||
elif signedHeader == 'content-length' or signedHeader == 'Content-Length':
|
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:
|
if debug:
|
||||||
print('DEBUG: verifyPostHeaders content-length does not match '+headers[signedHeader]+' != '+str(contentLength))
|
print('DEBUG: verifyPostHeaders adding content-length to signedHeaderList')
|
||||||
return False
|
signedHeaderList.append(f'content-length: {headers[signedHeader]}')
|
||||||
signedHeaderList.append(f'content-length: {headers[signedHeader]}')
|
else:
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: verifyPostHeaders '+signedHeader+' not found in '+str(headers))
|
||||||
else:
|
else:
|
||||||
if headers.get(signedHeader):
|
if headers.get(signedHeader):
|
||||||
if signedHeader=='date':
|
if signedHeader=='date':
|
||||||
|
|
Loading…
Reference in New Issue