mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add quotation marks for basic auth challenge
This is required by RFC 2617
This commit is contained in:
parent
c685a31056
commit
e094ea3d2a
2
red.js
2
red.js
@ -240,7 +240,7 @@ function basicAuthMiddleware(user,pass) {
|
||||
}
|
||||
var requestUser = basicAuth(req);
|
||||
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);
|
||||
}
|
||||
next();
|
||||
|
Loading…
Reference in New Issue
Block a user