From e094ea3d2a30e677c343f764bced305c99de0c28 Mon Sep 17 00:00:00 2001 From: Matthias Uttendorfer Date: Tue, 13 Nov 2018 23:05:19 +0100 Subject: [PATCH] Add quotation marks for basic auth challenge This is required by RFC 2617 --- red.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/red.js b/red.js index c7dc8b131..94a0b26bb 100755 --- a/red.js +++ b/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();