api/core: limit authorization header length
This commit is contained in:
parent
a49a87544c
commit
c54294601b
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue