特殊なケースで不正なユーザーが作成されてしまう問題を修正
This commit is contained in:
parent
f7c5f31661
commit
0626f1581e
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,7 @@ import striptags from 'striptags';
|
||||||
import MarkdownIt from 'markdown-it';
|
import MarkdownIt from 'markdown-it';
|
||||||
|
|
||||||
import { config } from '../config';
|
import { config } from '../config';
|
||||||
import { upsertUser, getUser, updateUser, updateUsersToolsToken } from './functions/users';
|
import { upsertUser, getUser, updateUser } from './functions/users';
|
||||||
import { api } from './services/misskey';
|
import { api } from './services/misskey';
|
||||||
import { die } from './die';
|
import { die } from './die';
|
||||||
import { misskeyAppInfo } from './const';
|
import { misskeyAppInfo } from './const';
|
||||||
|
@ -50,6 +50,12 @@ router.get('/login', async ctx => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE:
|
||||||
|
// 環境によってはアクセスしたドメインとMisskeyにおけるhostが異なるケースがある
|
||||||
|
// そういったインスタンスにおいてアカウントの不整合が生じるため、
|
||||||
|
// APIから戻ってきたホスト名を正しいものとして、改めて正規化する
|
||||||
|
host = meta.uri.replace(/^https?:\/\//g, '').replace(/\/+/g, '').trim();
|
||||||
|
|
||||||
const { name, permission, description } = misskeyAppInfo;
|
const { name, permission, description } = misskeyAppInfo;
|
||||||
|
|
||||||
if (meta.features.miauth) {
|
if (meta.features.miauth) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue