acct uri may have double slashes after scheme, may be url encoded

This commit is contained in:
Mike Macgirvin 2010-08-30 20:59:56 -07:00
parent 2d76a5c76b
commit e71672a409
1 changed files with 4 additions and 1 deletions

View 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",