Skip to content

Commit

Permalink
trust the callback
Browse files Browse the repository at this point in the history
  • Loading branch information
rupa committed Aug 23, 2011
1 parent 869c5b6 commit 1bb77ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions auth.js
Expand Up @@ -23,8 +23,7 @@ auth.authorize = function(req, res, callback) {
if( "authorization" in req.headers ) {
var authorization = req.headers.authorization.split(' ');
authorization = base64.decode(authorization[1]).split(':');
var creds = callback(authorization[0], authorization[1]);
if( creds ) return creds;
return callback(authorization[0], authorization[1]);
}
res.writeHead(401, {
"WWW-Authenticate": 'Basic Realm="' + auth.realm + '"',
Expand Down

0 comments on commit 1bb77ef

Please sign in to comment.