kirm / sip.js

Session Initiation Protocol for node.js
MIT License
431 stars 171 forks source link

REGISTER&authorization bugs #142

Closed ruokid closed 4 years ago

ruokid commented 4 years ago

image

ruokid commented 4 years ago

And digest.authenticateRequest always return false

ruokid commented 4 years ago

And digest.authenticateRequest always return false

image

this can solve the problem, but not good enough

kirm commented 4 years ago

Thanks, for pointing out the typo. Regarding digest.authenticateRequest always returning false, you 'fix' effectively disables authentication. Can you show me the entire exchange including the challenge?

ruokid commented 4 years ago

Regarding digest.authenticateRequest always returning false, you 'fix' effectively disables authentication.

image

i forget set cnonce in challenge(), but why ctx.nonce = ctx.cnonce ?

if digest.challenge({ nonce: nonce }) then client will generate new nonce

so digest.authenticateRequest always returning false

now i change digest.challenge({ nonce: nonce }) => digest.challenge({ cnonce: nonce }) image