aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/activitypub/actor.ts3
-rw-r--r--server/helpers/custom-validators/activitypub/announce.ts1
-rw-r--r--server/helpers/custom-validators/activitypub/index.ts8
3 files changed, 2 insertions, 10 deletions
diff --git a/server/helpers/custom-validators/activitypub/actor.ts b/server/helpers/custom-validators/activitypub/actor.ts
index ec8da3350..630bace30 100644
--- a/server/helpers/custom-validators/activitypub/actor.ts
+++ b/server/helpers/custom-validators/activitypub/actor.ts
@@ -46,7 +46,8 @@ function isActorPrivateKeyValid (privateKey: string) {
46} 46}
47 47
48function isRemoteActorValid (remoteActor: any) { 48function isRemoteActorValid (remoteActor: any) {
49 return isActivityPubUrlValid(remoteActor.id) && 49 return exists(remoteActor) &&
50 isActivityPubUrlValid(remoteActor.id) &&
50 isActorTypeValid(remoteActor.type) && 51 isActorTypeValid(remoteActor.type) &&
51 isActivityPubUrlValid(remoteActor.following) && 52 isActivityPubUrlValid(remoteActor.following) &&
52 isActivityPubUrlValid(remoteActor.followers) && 53 isActivityPubUrlValid(remoteActor.followers) &&
diff --git a/server/helpers/custom-validators/activitypub/announce.ts b/server/helpers/custom-validators/activitypub/announce.ts
index 1baea4f60..7dd1d6988 100644
--- a/server/helpers/custom-validators/activitypub/announce.ts
+++ b/server/helpers/custom-validators/activitypub/announce.ts
@@ -2,7 +2,6 @@ import { isActivityPubUrlValid, isBaseActivityValid } from './misc'
2import { isVideoTorrentCreateActivityValid } from './videos' 2import { isVideoTorrentCreateActivityValid } from './videos'
3 3
4function isAnnounceActivityValid (activity: any) { 4function isAnnounceActivityValid (activity: any) {
5 console.log(activity)
6 return isBaseActivityValid(activity, 'Announce') && 5 return isBaseActivityValid(activity, 'Announce') &&
7 ( 6 (
8 isVideoTorrentCreateActivityValid(activity.object) || 7 isVideoTorrentCreateActivityValid(activity.object) ||
diff --git a/server/helpers/custom-validators/activitypub/index.ts b/server/helpers/custom-validators/activitypub/index.ts
deleted file mode 100644
index ba411f1c6..000000000
--- a/server/helpers/custom-validators/activitypub/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
1export * from './actor'
2export * from './activity'
3export * from './misc'
4export * from './signature'
5export * from './undo'
6export * from './video-channels'
7export * from './videos'
8export * from './view'