Skip to content

Commit

Permalink
Fix for nonces bug appearing every hour and making server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sedlan committed Feb 19, 2012
1 parent 54df99f commit bf926fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http-auth.js
Expand Up @@ -34,7 +34,7 @@ module.exports = {
* @param {Object} nonce.
* @api private.
*/
'expire_nonce' : function(nonce) {
'expire_nonce' : function(nonce, nonces) {
delete nonces[nonce];
},
/**
Expand Down Expand Up @@ -207,7 +207,7 @@ module.exports = {
callbackObj.nonces[nonce] = {
count : 0,
};
setTimeout(callbackObj.expire_nonce, callbackObj.nonce_expire_timeout, nonce);
setTimeout(callbackObj.expire_nonce, callbackObj.nonce_expire_timeout, nonce, this.nonces);

// generate opaque (TODO: move outside)
var opaque = callbackObj.md5("hostname or something");
Expand Down

0 comments on commit bf926fb

Please sign in to comment.