diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-08-07 19:36:43 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-08-07 19:36:43 +1000 |
commit | 12799f3d12cf52cb02ad0aa4ce052c477faf241e (patch) | |
tree | 56be7a41d8b958067c6a4ae59d4c0ef57fcb5e8d /src/util | |
parent | goof (diff) | |
download | server-12799f3d12cf52cb02ad0aa4ce052c477faf241e.tar.xz |
allow bot/bearer tokens through Authorization header
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/util/Token.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/util/Token.ts b/src/util/util/Token.ts index eec72522..97bdec74 100644 --- a/src/util/util/Token.ts +++ b/src/util/util/Token.ts @@ -40,6 +40,9 @@ export const checkToken = ( }, ): Promise<UserTokenData> => new Promise((resolve, reject) => { + token = token.replace("Bot ", ""); // there is no bot distinction in sb + token = token.replace("Bearer ", ""); // allow bearer tokens + jwt.verify( token, Config.get().security.jwtSecret, |