mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
api/core: limit authorization header length
This commit is contained in:
parent
a49a87544c
commit
c54294601b
@ -157,7 +157,7 @@ export function runAPI(express, app, __dirname) {
|
||||
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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user