Fix crash when CPE sends invalid auth header

This commit is contained in:
Zaid Abdulla committed 2021-07-13 18:45:23 -07:00
1 parent 8b27794cc7
commit 6c37e88ab1
2 files changed
+14 -6

No files matched your search

+7 -3
View File
@@ -84,9 +84,13 @@ async function authenticate(
let authentication;
if (sessionContext.httpRequest.headers["authorization"]) {
authentication = auth.parseAuthorizationHeader(
sessionContext.httpRequest.headers["authorization"]
);
try {
authentication = auth.parseAuthorizationHeader(
sessionContext.httpRequest.headers["authorization"]
);
} catch (err) {
return false;
}
}
if (authentication && authentication.method === "Digest") {