mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-13 05:37:44 +02:00
api/core: limit authorization header length
This commit is contained in:
@ -157,7 +157,7 @@ export function runAPI(express, app, __dirname) {
|
|||||||
return fail("error.api.auth.jwt.missing");
|
return fail("error.api.auth.jwt.missing");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!authorization.startsWith("Bearer ")) {
|
if (!authorization.startsWith("Bearer ") || authorization.length > 256) {
|
||||||
return fail("error.api.auth.jwt.invalid");
|
return fail("error.api.auth.jwt.invalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user