Fix crash when CPE sends invalid auth header
This commit is contained in:
1 parent
8b27794cc7
commit
6c37e88ab1
2 files changed
+14
-6
No files matched your search
+7
-3
@@ -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") {
|
||||
|
||||
Reference in new issue
Block a user