diff options
author | Zach Copley <zach@status.net> | 2010-03-22 18:54:46 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-03-22 18:54:46 -0700 |
commit | 073e3a1572d0cd5934c6578f4245c39e8376351f (patch) | |
tree | ed3d62de6faa49803f54c378d8fa2ce49365e9a5 /plugins/OStatus/actions | |
parent | a0a9acb9a284910e6b7dd95c847e8226dde7732d (diff) | |
parent | 3678e7b89bd0cc683c98369e5dec3b940134532b (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
OStatus remote sending test cases. Doesn't actually run within PHPUnit right now, must be run from command line -- specify base URLs to two StatusNet sites that will be able to communicate with each other.
Math_BigInteger doesn't correctly handle serialization/deserialization for a value of 0, which can end up spewing notices to output and otherwise intefering with Salmon signature setup and verification when using memcached.
Log backtraces for non-ClientException exceptions caught at the top-level handler.
Confirm there's actually user and domain portions of acct string before assigning things from output of explode(); avoids notice message when invalid input passed to main/xrd
Fixing HTTP Header LRDD parsing (sites in subdirectories need this)
Replace the "give up and dump object" attachment view fallback with a client-side redirect to the target URL, which will at least be useful.
ignore unrecognized object types
Pull <atom:author> info as well as <activity:actor> when we have an old-style ActivityStreams feed. This fixes subscription setup for Cliqset feeds, which currently have a bogus activity:actor/atom:id but a good atom:author/atom:uri
Accept 'tag' and other non-http id URIs in Ostatus_profile::getActivityObjectProfileURI().
Diffstat (limited to 'plugins/OStatus/actions')
-rw-r--r-- | plugins/OStatus/actions/userxrd.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/OStatus/actions/userxrd.php b/plugins/OStatus/actions/userxrd.php index eb80a5ad4..6a6886eb8 100644 --- a/plugins/OStatus/actions/userxrd.php +++ b/plugins/OStatus/actions/userxrd.php @@ -35,9 +35,13 @@ class UserxrdAction extends XrdAction $this->uri = Discovery::normalize($this->uri); if (Discovery::isWebfinger($this->uri)) { - list($nick, $domain) = explode('@', substr(urldecode($this->uri), 5)); - $nick = common_canonical_nickname($nick); - $this->user = User::staticGet('nickname', $nick); + $parts = explode('@', substr(urldecode($this->uri), 5)); + if (count($parts) == 2) { + list($nick, $domain) = $parts; + // @fixme confirm the domain too + $nick = common_canonical_nickname($nick); + $this->user = User::staticGet('nickname', $nick); + } } else { $this->user = User::staticGet('uri', $this->uri); } |