diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-11-18 13:06:44 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-11-18 13:06:44 -0500 |
commit | a179a816b589d8fc097c7fff068dbe5b053e9e27 (patch) | |
tree | 7c96f7214d06f5ae0225dedabadc1fec176d1860 /actions/finishremotesubscribe.php | |
parent | 67340ce11c773287a4807ddc4567add775a3fcd7 (diff) |
add some extra checks to avoid remote subscriptions to local users
darcs-hash:20081118180644-84dde-ab152249ac0844a482029b7e0f8db2780a0f15d6.gz
Diffstat (limited to 'actions/finishremotesubscribe.php')
-rw-r--r-- | actions/finishremotesubscribe.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index ae62fe4b3..cacf545b5 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -80,6 +80,11 @@ class FinishremotesubscribeAction extends Action { return; } + if ($profile_url == common_local_url('showstream', array('nickname' => $nickname))) { + common_user_error(_('You can use the local subscription!')); + return; + } + common_debug('listenee: "'.$omb['listenee'].'"', __FILE__); $user = User::staticGet('nickname', $omb['listenee']); @@ -89,6 +94,13 @@ class FinishremotesubscribeAction extends Action { return; } + $other = User::staticGet('uri', $omb['listener']); + + if ($other) { + common_user_error(_('You can use the local subscription!')); + return; + } + $fullname = $req->get_parameter('omb_listener_fullname'); $homepage = $req->get_parameter('omb_listener_homepage'); $bio = $req->get_parameter('omb_listener_bio'); |