mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-24 08:04:08 +02:00
fix(backend): 存在しないActorに対するDeleteアクティビティは無視するように (#17294)
* fix(backend): 存在しないActorに対するDeleteアクティビティは無視するように
* Update Changelog
* fix
* Revert "fix"
This reverts commit 985feea326.
* fix?
* fix
* fix
* fix
* fix
* refactor: remove unused imports
* fix
* Update CHANGELOG.md [ci skip]
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
### Server
|
### Server
|
||||||
- Fix: `/api-doc` にアクセスできない問題を修正
|
- Fix: `/api-doc` にアクセスできない問題を修正
|
||||||
- Fix: support `alsoKnownAs` from remote actors as either array or unwrapped singleton
|
- Fix: support `alsoKnownAs` from remote actors as either array or unwrapped singleton
|
||||||
|
- Fix: ローカルに存在しないリモートアカウントに対するアカウント削除リクエストを受信した際に、そのユーザーを新規作成して削除する挙動を修正
|
||||||
|
|
||||||
## 2026.3.2
|
## 2026.3.2
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataServic
|
|||||||
import InstanceChart from '@/core/chart/charts/instance.js';
|
import InstanceChart from '@/core/chart/charts/instance.js';
|
||||||
import ApRequestChart from '@/core/chart/charts/ap-request.js';
|
import ApRequestChart from '@/core/chart/charts/ap-request.js';
|
||||||
import FederationChart from '@/core/chart/charts/federation.js';
|
import FederationChart from '@/core/chart/charts/federation.js';
|
||||||
import { getApId } from '@/core/activitypub/type.js';
|
import { getApId, isActor, isDelete } from '@/core/activitypub/type.js';
|
||||||
import type { IActivity } from '@/core/activitypub/type.js';
|
import type { IActivity } from '@/core/activitypub/type.js';
|
||||||
import type { MiRemoteUser } from '@/models/User.js';
|
import type { MiRemoteUser } from '@/models/User.js';
|
||||||
import type { MiUserPublickey } from '@/models/UserPublickey.js';
|
import type { MiUserPublickey } from '@/models/UserPublickey.js';
|
||||||
@@ -84,6 +84,23 @@ export class InboxProcessorService implements OnApplicationShutdown {
|
|||||||
return `Old keyId is no longer supported. ${keyIdLower}`;
|
return `Old keyId is no longer supported. ${keyIdLower}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
let userExistenceCheckApId: string | null = null;
|
||||||
|
|
||||||
|
// 存在しないActorに対するActorのDeleteアクティビティは無視する。
|
||||||
|
// actorとobjectが同じならばそれはActorに違いない
|
||||||
|
if (isDelete(activity) && typeof activity.object === 'object' && (isActor(activity.object) || getApId(activity.actor) === getApId(activity.object))) {
|
||||||
|
userExistenceCheckApId = getApId(activity.object);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userExistenceCheckApId != null) {
|
||||||
|
const user = await this.apDbResolverService.getUserFromApId(userExistenceCheckApId);
|
||||||
|
if (user == null) {
|
||||||
|
throw new Bull.UnrecoverableError(`skip: user not found for delete activity. ${getApId(userExistenceCheckApId)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// HTTP-Signature keyIdを元にDBから取得
|
// HTTP-Signature keyIdを元にDBから取得
|
||||||
let authUser: {
|
let authUser: {
|
||||||
user: MiRemoteUser;
|
user: MiRemoteUser;
|
||||||
|
|||||||
Reference in New Issue
Block a user