Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing issue with GET request with params.

  • Loading branch information...
commit a90d3b62650a999691ff96a0959d7134c1d690d9 1 parent bf38e64
@gevorg authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/auth/digest.js
View
7 lib/auth/digest.js
@@ -83,9 +83,8 @@ Digest.prototype.isAuthenticated = function(request) {
// Check for expiration.
if(co.nonce in this.nonces) {
// Second hash in digest access authentication.
- var ha2;
- // Calculating second hash.
- ha2 = utils.md5(request.method + ":" + co.uri);
+ // Calculating second hash.
+ var ha2 = utils.md5(request.method + ":" + request.url);
// Checking response for username.
var userHash = this.users[co.username];
@@ -114,7 +113,7 @@ Digest.prototype.isAuthenticated = function(request) {
} else {
// Evaluating final authentication response.
var authRes = utils.md5(ha1 + ":" + co.nonce + ":" + ha2);
- authenticated = (authRes == co.response) ? co.userid : undefined;
+ authenticated = (authRes == co.response) ? co.username : undefined;
}
}
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.