summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/app/mios.ts2
-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
-rw-r--r--src/services/drive/add-file.ts1
5 files changed, 5 insertions, 4 deletions
diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts
index b69c340528..191b72e5bf 100644
--- a/src/client/app/mios.ts
+++ b/src/client/app/mios.ts
@@ -195,7 +195,7 @@ export default class MiOS extends EventEmitter {
});
} else {
// Get token from cookie or localStorage
- const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1] || localStorage.getItem('i');
+ const i = (document.cookie.match(/i=(\w+)/) || [null, null])[1] || localStorage.getItem('i');
fetchme(i, me => {
if (me) {
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) {
diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts
index e569180354..4cb36adbfc 100644
--- a/src/services/drive/add-file.ts
+++ b/src/services/drive/add-file.ts
@@ -406,6 +406,7 @@ export default async function(
file.md5 = hash;
file.name = detectedName;
file.type = mime;
+ file.storedInternal = false;
file = await DriveFiles.save(file);
} catch (e) {