1
0
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:
Nick O'Leary 2018-11-13 23:16:41 +00:00 committed by GitHub
commit 2f93bb969b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
red.js
View File

@ -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();