summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-31 14:53:56 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-31 14:53:56 +1100
commit09b0eeb2dd0921dc4afc0d7d9459ad89d35f619f (patch)
treed9d7de04beee6e52c9b038c4fd5ac6868e27cd4f /src/util
parentPatch body-parser to use json-bigint (diff)
parentAllow Bearer tokens through, like Bot (diff)
downloadserver-ts-09b0eeb2dd0921dc4afc0d7d9459ad89d35f619f.tar.xz
Merge branch 'maddy/refactor' into maddy/bodyParserPatch
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util/Token.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts

index 19e64f47..ab323f2a 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts
@@ -7,6 +7,7 @@ export const JWTOptions: VerifyOptions = { algorithms: ["HS256"] }; export function checkToken(token: string, jwtSecret: string): Promise<any> { return new Promise((res, rej) => { token = token.replace("Bot ", ""); + token = token.replace("Bearer ", ""); /** in fosscord, even with instances that have bot distinction; we won't enforce "Bot" prefix, as we don't really have separate pathways for bots