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']);
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');
return;
}
+ if (omb_service_uri($omb[OAUTH_ENDPOINT_REQUEST]) ==
+ common_local_url('requesttoken'))
+ {
+ $this->show_form(_('That\'s a local profile! Login to subscribe.'));
+ return;
+ }
+
list($token, $secret) = $this->request_token($omb);
if (!$token || !$secret) {
if (strlen($listenee) > 255) {
throw new OAuthException("Listenee URI '$listenee' too long");
}
+
+ $other = User::staticGet('uri', $listenee);
+ if ($other) {
+ throw new OAuthException("Listenee URI '$listenee' is local user");
+ }
+
$remote = Remote_profile::staticGet('uri', $listenee);
if ($remote) {
$sub = new Subscription();
if (!common_valid_http_url($profile)) {
throw new OAuthException("Invalid profile URL '$profile'.");
}
+
+ if ($profile == common_local_url('showstream', array('nickname' => $nickname))) {
+ throw new OAuthException("Profile URL '$profile' is for a local user.");
+ }
+
$license = $req->get_parameter('omb_listenee_license');
if (!common_valid_http_url($license)) {
throw new OAuthException("Invalid license URL '$license'.");
if ($callback && !common_valid_http_url($callback)) {
throw new OAuthException("Invalid callback URL '$callback'");
}
+ if ($callback && $callback == common_local_url('finishremotesubscribe')) {
+ throw new OAuthException("Callback URL '$callback' is for local site.");
+ }
}
# Snagged from OAuthServer