rpc/auth: force lowercase the human challenge

This commit is contained in:
41666 2019-03-19 21:09:30 -05:00
parent bbb34f1771
commit fe7c55a6c9

View file

@ -4,7 +4,7 @@ import { type Context } from 'koa'
export default ($: AppContext) => ({
async checkAuthChallenge (ctx: Context, text: string): Promise<boolean> {
const chall = await $.auth.fetchDMChallenge({ human: text })
const chall = await $.auth.fetchDMChallenge({ human: text.toLowerCase() })
if (chall == null) {
return false
}