Remove unwanted ! character in user token regex (#4830)

This commit is contained in:
Satsuki Yanagi
2019-05-02 06:24:32 +09:00
committed by syuilo
parent 7882851539
commit 419cb7fbad
4 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
function getUserToken(ctx: Koa.BaseContext) {
return ((ctx.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
return ((ctx.headers['cookie'] || '').match(/i=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext) {

View File

@ -13,7 +13,7 @@ import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
function getUserToken(ctx: Koa.BaseContext) {
return ((ctx.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
return ((ctx.headers['cookie'] || '').match(/i=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext) {

View File

@ -12,7 +12,7 @@ import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
function getUserToken(ctx: Koa.BaseContext) {
return ((ctx.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
return ((ctx.headers['cookie'] || '').match(/i=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext) {