mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
[Server] toLowerCase ✌️
This commit is contained in:
parent
f1065d99e6
commit
6a26d4d910
@ -22,7 +22,7 @@ export interface IAuthContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default (req: express.Request) => new Promise<IAuthContext>(async (resolve, reject) => {
|
export default (req: express.Request) => new Promise<IAuthContext>(async (resolve, reject) => {
|
||||||
const token = req.body['i'];
|
const token = req.body['i'] as string;
|
||||||
|
|
||||||
if (token == null) {
|
if (token == null) {
|
||||||
return resolve({ app: null, user: null, isSecure: false });
|
return resolve({ app: null, user: null, isSecure: false });
|
||||||
@ -43,7 +43,7 @@ export default (req: express.Request) => new Promise<IAuthContext>(async (resolv
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const accessToken = await AccessToken.findOne({
|
const accessToken = await AccessToken.findOne({
|
||||||
hash: token
|
hash: token.toLowerCase()
|
||||||
});
|
});
|
||||||
|
|
||||||
if (accessToken === null) {
|
if (accessToken === null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user