[heartbeat] used the wrong variable for calculating the digest
This commit is contained in:
parent
f94e74ddc7
commit
30e0aabab1
|
@ -122,7 +122,7 @@ end
|
||||||
|
|
||||||
-- verify the reply's digest
|
-- verify the reply's digest
|
||||||
hash = nixio.crypto.hmac('sha1', WAN_KEY)
|
hash = nixio.crypto.hmac('sha1', WAN_KEY)
|
||||||
hash:update(response)
|
hash:update(response_json)
|
||||||
if call_info.headers['X-Digest'] ~= hash:final() then
|
if call_info.headers['X-Digest'] ~= hash:final() then
|
||||||
nixio.syslog('err', 'Incorrect digest in the heartbeat reply. Discard response.')
|
nixio.syslog('err', 'Incorrect digest in the heartbeat reply. Discard response.')
|
||||||
os.exit(3)
|
os.exit(3)
|
||||||
|
|
Loading…
Reference in New Issue