]> git.mxchange.org Git - friendica.git/commitdiff
acct uri may have double slashes after scheme, may be url encoded
authorMike Macgirvin <mike@macgirvin.com>
Tue, 31 Aug 2010 03:59:56 +0000 (20:59 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Tue, 31 Aug 2010 03:59:56 +0000 (20:59 -0700)
mod/xrd.php

index 5d43147a7035fba1e54073ffe9a19c8841ef692f..c6c5515c53dfcf8d2b26f5f83c9aec96663597ab 100644 (file)
@@ -3,8 +3,11 @@
 
 function xrd_content(&$a) {
 
-       $uri = notags(trim($_GET['uri']));
+       $uri = urldecode(notags(trim($_GET['uri'])));
        $local = str_replace('acct:', '', $uri);
+       if(substr($local,0,2) == '//')
+               $local = substr($local,2);
+
        $name = substr($local,0,strpos($local,'@'));
 
        $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",