]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Avoid slurping objects recursively in activity parsing
authorEvan Prodromou <evan@status.net>
Tue, 19 Jul 2011 20:18:29 +0000 (16:18 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 19 Jul 2011 20:18:29 +0000 (16:18 -0400)
lib/activity.php

index f5590047d46733f84278978d13cbc3e0586c0c99..12ea53a9fefdc02fddc6257c8876f1693dc66d5b 100644 (file)
@@ -176,6 +176,10 @@ class Activity
         if ($objectEls->length > 0) {
             for ($i = 0; $i < $objectEls->length; $i++) {
                 $objectEl = $objectEls->item($i);
+                // Only immediate children (don't slurp embedded activities' objects!)
+                if ($objectEl->parentNode != $entry) {
+                    continue;
+                }
                 // Special case for embedded activities
                 $objectType = ActivityUtils::childContent($objectEl, self::OBJECTTYPE, self::SPEC);
                 if (!empty($objectType) && $objectType == ActivityObject::ACTIVITY) {