From: Zach Copley Date: Mon, 8 Mar 2010 22:53:43 +0000 (+0000) Subject: Only allow RSSCloud subs to canonical RSS2 profile feeds X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=49722f65502b9730f1c1434851e21d02b8b2fd41;p=quix0rs-gnu-social.git Only allow RSSCloud subs to canonical RSS2 profile feeds --- diff --git a/plugins/RSSCloud/RSSCloudRequestNotify.php b/plugins/RSSCloud/RSSCloudRequestNotify.php index d76c08d379..0305295348 100644 --- a/plugins/RSSCloud/RSSCloudRequestNotify.php +++ b/plugins/RSSCloud/RSSCloudRequestNotify.php @@ -270,13 +270,14 @@ class RSSCloudRequestNotifyAction extends Action function userFromFeed($feed) { - // We only do profile feeds + // We only do canonical RSS2 profile feeds (specified by ID), e.g.: + // http://www.example.com/api/statuses/user_timeline/2.rss $path = common_path('api/statuses/user_timeline/'); - $valid = '%^' . $path . '(?.*)\.rss$%'; + $valid = '%^' . $path . '(?.*)\.rss$%'; if (preg_match($valid, $feed, $matches)) { - $user = User::staticGet('nickname', $matches['nickname']); + $user = User::staticGet('id', $matches['id']); if (!empty($user)) { return $user; }