mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #1976 from MatthiasU/master
Add quotation marks for basic auth challenge
This commit is contained in:
commit
2f93bb969b
2
red.js
2
red.js
@ -240,7 +240,7 @@ function basicAuthMiddleware(user,pass) {
|
|||||||
}
|
}
|
||||||
var requestUser = basicAuth(req);
|
var requestUser = basicAuth(req);
|
||||||
if (!requestUser || requestUser.name !== user || !checkPasswordAndCache(requestUser.pass)) {
|
if (!requestUser || requestUser.name !== user || !checkPasswordAndCache(requestUser.pass)) {
|
||||||
res.set('WWW-Authenticate', 'Basic realm=Authorization Required');
|
res.set('WWW-Authenticate', 'Basic realm="Authorization Required"');
|
||||||
return res.sendStatus(401);
|
return res.sendStatus(401);
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
Loading…
Reference in New Issue
Block a user