From 6943eee6237d18cf6e98c888749f524484ce7a5b Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Wed, 1 Aug 2018 01:09:34 +0100 Subject: [PATCH 1/4] testing --- actions/inbox/Create.php | 2 +- classes/Activitypub_notice.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/inbox/Create.php b/actions/inbox/Create.php index 0c55bdd..e999130 100755 --- a/actions/inbox/Create.php +++ b/actions/inbox/Create.php @@ -144,7 +144,7 @@ ToSelector::fillActivity($this, $act, $options); $actobj = new ActivityObject(); $actobj->type = ActivityObject::NOTE; -$actobj->content = common_render_content($content, $actor_profile, $inReplyTo); +$actobj->content = $content; //common_render_content($content, $actor_profile, $inReplyTo); // Finally add the activity object to our activity $act->objects[] = $actobj; diff --git a/classes/Activitypub_notice.php b/classes/Activitypub_notice.php index f0227e9..7409de5 100755 --- a/classes/Activitypub_notice.php +++ b/classes/Activitypub_notice.php @@ -82,7 +82,7 @@ class Activitypub_notice extends Managed_DataObject 'cc' => common_local_url('apActorFollowers', ['id' => $profile->getID()]), 'atomUri' => $notice->getUrl(), 'conversation' => $notice->getConversationUrl(), - 'content' => $notice->getContent(), + 'content' => $notice->getRendered(), 'isLocal' => $notice->isLocal(), 'attachment' => $attachments, 'tag' => $tags From 42bfb7818461a390176835e3b2a87eaa9cd566ab Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Wed, 1 Aug 2018 01:32:41 +0100 Subject: [PATCH 2/4] No XSS --- actions/inbox/Create.php | 2 +- actions/inbox/Like.php | 2 +- actions/inbox/Undo.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/inbox/Create.php b/actions/inbox/Create.php index e999130..592b5cc 100755 --- a/actions/inbox/Create.php +++ b/actions/inbox/Create.php @@ -144,7 +144,7 @@ ToSelector::fillActivity($this, $act, $options); $actobj = new ActivityObject(); $actobj->type = ActivityObject::NOTE; -$actobj->content = $content; //common_render_content($content, $actor_profile, $inReplyTo); +$actobj->content = strip_tags($content,'