summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorSatsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>2019-05-02 06:24:32 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-05-02 06:24:32 +0900
commit419cb7fbadbc6695e3f7c73d55c456bb54d12278 (patch)
treebf944819ba8a8118eea4f0ad568a7ff62da53089 /src/server
parentFix TypeScript semantic error (#4828) (diff)
downloadsharkey-419cb7fbadbc6695e3f7c73d55c456bb54d12278.tar.gz
sharkey-419cb7fbadbc6695e3f7c73d55c456bb54d12278.tar.bz2
sharkey-419cb7fbadbc6695e3f7c73d55c456bb54d12278.zip
Remove unwanted ! character in user token regex (#4830)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/api/service/discord.ts2
-rw-r--r--src/server/api/service/github.ts2
-rw-r--r--src/server/api/service/twitter.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/server/api/service/discord.ts b/src/server/api/service/discord.ts
index 589579b8e0..ac4d9a5601 100644
--- a/src/server/api/service/discord.ts
+++ b/src/server/api/service/discord.ts
@@ -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) {
diff --git a/src/server/api/service/github.ts b/src/server/api/service/github.ts
index 1b0ce6936c..4f287406d1 100644
--- a/src/server/api/service/github.ts
+++ b/src/server/api/service/github.ts
@@ -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) {
diff --git a/src/server/api/service/twitter.ts b/src/server/api/service/twitter.ts
index 36299b1f29..3a5800f00b 100644
--- a/src/server/api/service/twitter.ts
+++ b/src/server/api/service/twitter.ts
@@ -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) {