Fix: AP actor Service のサポートが不完全 (v11) (#4662)

This commit is contained in:
MeiMei 2019-04-11 03:09:12 +09:00 committed by syuilo
parent ab302df0ae
commit 2a7e3b9c51
4 changed files with 8 additions and 3 deletions

View file

@ -13,6 +13,7 @@ import { instanceChart } from '../../services/chart';
import { UserPublickey } from '../../models/entities/user-publickey';
import fetchMeta from '../../misc/fetch-meta';
import { toPuny } from '../../misc/convert-host';
import { validActor } from '../../remote/activitypub/type';
const logger = new Logger('inbox');
@ -93,7 +94,7 @@ export default async (job: Bull.Job): Promise<void> => {
// Update Person activityの場合は、ここで署名検証/更新処理まで実施して終了
if (activity.type === 'Update') {
if (activity.object && activity.object.type === 'Person') {
if (activity.object && validActor.includes(activity.object.type)) {
if (user == null) {
logger.warn('Update activity received, but user not registed.');
} else if (!httpSignature.verifySignature(signature, key.keyPem)) {