mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 13:17:45 +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");
|
||||
}
|
||||
|
||||
if (!authorization.startsWith("Bearer ")) {
|
||||
if (!authorization.startsWith("Bearer ") || authorization.length > 256) {
|
||||
return fail("error.api.auth.jwt.invalid");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user