go-http-auth
go-http-auth copied to clipboard
A better fix for the nc out of order problem
I gave some more thought to your concerns about disabling nc checking and I think you're right, it's not a good idea. So I bit the bullet and implemented this PR. It uses a fixed size bitset to track the nc values seen for each nonce and also implements stale=true (issue #24). If an nc is seen that is out of range, we simply treat it as if the nonce expired and use stale=true to avoid the client popping up an authentication dialog. nc values can arrive out of order, if a replay is seen it is detected and auth fails. I have implemented this in my proxy server and it's working great now. LMK if you have any questions.
Sorry this has gotten a bit messy, if it's easier I can send you a new PR from my master which is up to date with all the PRs I sent you.
Hi. If you are still interested in merging this, can you please rebase against current master? Thanks!