diff options
author | Zach Copley <zach@status.net> | 2010-03-08 22:53:43 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-03-08 22:53:43 +0000 |
commit | 49722f65502b9730f1c1434851e21d02b8b2fd41 (patch) | |
tree | a8fe749f860cbf41e65d3cf1f27ed0bb49767659 | |
parent | 927a368d0e4c924ec8132ff054be311e17ded45e (diff) |
Only allow RSSCloud subs to canonical RSS2 profile feeds
-rw-r--r-- | plugins/RSSCloud/RSSCloudRequestNotify.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/RSSCloud/RSSCloudRequestNotify.php b/plugins/RSSCloud/RSSCloudRequestNotify.php index d76c08d37..030529534 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 . '(?<nickname>.*)\.rss$%'; + $valid = '%^' . $path . '(?<id>.*)\.rss$%'; if (preg_match($valid, $feed, $matches)) { - $user = User::staticGet('nickname', $matches['nickname']); + $user = User::staticGet('id', $matches['id']); if (!empty($user)) { return $user; } |