summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/models/note.ts
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2021-10-31 18:01:16 +0900
committerGitHub <noreply@github.com>2021-10-31 18:01:16 +0900
commite2556189decf5d6e6c9923a0c81c6214749b40b6 (patch)
tree04b300aea9e25a8a9f4225f355f737ab19c42b33 /src/remote/activitypub/models/note.ts
parentユーザー情報のhasUnreadChannelが常にfalseになってしまって... (diff)
downloadmisskey-e2556189decf5d6e6c9923a0c81c6214749b40b6.tar.gz
misskey-e2556189decf5d6e6c9923a0c81c6214749b40b6.tar.bz2
misskey-e2556189decf5d6e6c9923a0c81c6214749b40b6.zip
fix: 削除したノートやユーザーがリモートから参照されると復活することがあるのを修正 (#7918)
* Fix #7557 * CHANGELOG * Fix user * CHANGELOG * Tune CHANGELOG * Tune CHANGELOG * resolver * Remove check * Remove import * CHANGELOG * Tune Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'src/remote/activitypub/models/note.ts')
-rw-r--r--src/remote/activitypub/models/note.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts
index cf68f3005d..492dc05248 100644
--- a/src/remote/activitypub/models/note.ts
+++ b/src/remote/activitypub/models/note.ts
@@ -288,6 +288,10 @@ export async function resolveNote(value: string | IObject, resolver?: Resolver):
}
//#endregion
+ if (uri.startsWith(config.url)) {
+ throw new StatusError('cannot resolve local note', 400, 'cannot resolve local note');
+ }
+
// リモートサーバーからフェッチしてきて登録
// ここでuriの代わりに添付されてきたNote Objectが指定されていると、サーバーフェッチを経ずにノートが生成されるが
// 添付されてきたNote Objectは偽装されている可能性があるため、常にuriを指定してサーバーフェッチを行う。