summaryrefslogtreecommitdiff
path: root/plugins/RSSCloud/RSSCloudRequestNotify.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-08 22:53:43 +0000
committerZach Copley <zach@status.net>2010-03-08 23:11:52 +0000
commitf8c5996758250dce4d0f922cdbc10dff653f73c5 (patch)
treefa966f0dae08eb43825727d2eb8d5276a6378d27 /plugins/RSSCloud/RSSCloudRequestNotify.php
parent51a245f18c1e4a830c5eb94f3e60c6b4b3e560ee (diff)
Only allow RSSCloud subs to canonical RSS2 profile feeds
Diffstat (limited to 'plugins/RSSCloud/RSSCloudRequestNotify.php')
-rw-r--r--plugins/RSSCloud/RSSCloudRequestNotify.php7
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;
}