Fixed SSPI authentication exception.
Ylian Saint-Hilaire committed
Sep 3, 2022 at 00:32 UTC
d1e04a7ca73103cbfb673a70c79a664e82cc5dee
1 file changed
+1
-1
webserver.js
+1
-1
@@ -2634,7 +2634,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
2634
if ((err != null) || (req.connection.user == null)) {
2635
obj.parent.authLog('https', 'Failed SSPI-auth for ' + req.connection.user + ' from ' + req.clientIp + ' port ' + req.connection.remotePort, { useragent: req.headers['user-agent'] });
2636
parent.debug('web', 'handleRootRequest: SSPI auth required.');
2637
- res.sendStatus(401);
2637
+ try { res.sendStatus(401); } catch (ex) { } // sspi.authenticate() should already have responded to this request.
2638
} else {
2639
parent.debug('web', 'handleRootRequest: SSPI auth ok.');
2640
handleRootRequestEx(req, res, domain, direct);