summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/client/app/common/views/components/signin.vue5
-rw-r--r--src/server/api/private/signin.ts4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue
index 5230ac371a..aad9a1b7cf 100644
--- a/src/client/app/common/views/components/signin.vue
+++ b/src/client/app/common/views/components/signin.vue
@@ -53,8 +53,9 @@ export default Vue.extend({
this.signing = true;
(this as any).api('signin', {
- username: this.username,
- password: this.password,
+ // password という名前(または username とのペア?)では何らかのフィルタリングがされるっぽい?
+ x: this.username,
+ y: this.password,
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
}).then(() => {
location.reload();
diff --git a/src/server/api/private/signin.ts b/src/server/api/private/signin.ts
index 65413208dd..32d3eecaed 100644
--- a/src/server/api/private/signin.ts
+++ b/src/server/api/private/signin.ts
@@ -12,8 +12,8 @@ export default async (ctx: Koa.Context) => {
ctx.set('Access-Control-Allow-Credentials', 'true');
const body = ctx.request.body as any;
- const username = body['username'];
- const password = body['password'];
+ const username = body['username'] || body['x'];
+ const password = body['password'] || body['y'];
const token = body['token'];
if (typeof username != 'string') {