]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Ostatus_profile::checkAuthorship(): throw ServerException when bogus non-authorship...
authorJoshua Judson Rosen <rozzin@geekspace.com>
Sun, 23 Nov 2014 23:02:20 +0000 (18:02 -0500)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 24 Nov 2014 11:29:41 +0000 (12:29 +0100)
Similarly to what ActivityUtils::checkAuthorship does; try to ensure
that activities from ambiguous OStatus feeds (groups and peopletags)
that require explicit authorship don't get in without explicit authors.

plugins/OStatus/classes/Ostatus_profile.php

index d93d8968388edbc764b24487c5a36a76d67e4b67..e31378e222ff9eb1b70de815c46bb66ee47c13ac 100644 (file)
@@ -2150,7 +2150,7 @@ class Ostatus_profile extends Managed_DataObject
                 common_log(LOG_WARNING,
                     "OStatus: skipping post with group listed ".
                     "as author: " . $oprofile->getUri() . " in feed from " . $this->getUri());
-                return false;
+                throw new ServerException('Activity author is a non-actor');
             }
         } else {
             $actor = $activity->actor;