diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_request.php | 8 | ||||
-rw-r--r-- | mod/follow.php | 6 | ||||
-rw-r--r-- | mod/item.php | 2 | ||||
-rw-r--r-- | mod/like.php | 4 |
4 files changed, 12 insertions, 8 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 6850f4be4..24c466bba 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -590,8 +590,12 @@ function dfrn_request_content(&$a) { $myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3 ); } } - else { - $myaddr = ((x($_GET,'address')) ? urldecode($_GET['address']) : ''); + elseif(x($_GET,'addr')) { + $myaddr = hex2bin($_GET['addr']); + } + else { + /* $_GET variables are already urldecoded */ + $myaddr = ((x($_GET,'address')) ? $_GET['address'] : ''); } /** diff --git a/mod/follow.php b/mod/follow.php index 3c9d77657..14bdb9fc6 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -38,11 +38,11 @@ function follow_post(&$a) { $ret = scrape_dfrn($dfrn); if(is_array($ret) && x($ret,'dfrn-request')) { if(strlen($a->path)) - $myaddr = urlencode($a->get_baseurl() . '/profile/' . $a->user['nickname']); + $myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']); else - $myaddr = urlencode($a->user['nickname'] . '@' . $a->get_hostname()); + $myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname()); - goaway($ret['dfrn-request'] . "&address=$myaddr"); + goaway($ret['dfrn-request'] . "&addr=$myaddr"); // NOTREACHED } diff --git a/mod/item.php b/mod/item.php index f9bf9a04e..f964e7737 100644 --- a/mod/item.php +++ b/mod/item.php @@ -228,7 +228,7 @@ function item_post(&$a) { } } if($profile) { - $body = str_replace($name,'[url=' . $profile . ']' . $newname . '[/url]', $body); + $body = str_replace('@' . $name, '@' . '[url=' . $profile . ']' . $newname . '[/url]', $body); $profile = str_replace(',','%2c',$profile); if(strlen($str_tags)) $str_tags .= ','; diff --git a/mod/like.php b/mod/like.php index cb4093d5d..7b2097578 100644 --- a/mod/like.php +++ b/mod/like.php @@ -149,8 +149,8 @@ EOT; $arr['author-name'] = $contact['name']; $arr['author-link'] = $contact['url']; $arr['author-avatar'] = $contact['thumb']; - $arr['body'] = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' . ' ' . t('likes') . ' ' - . '[url=' . $owner['url'] . ']' . $owner['name'] . t('\'s') . '[/url]' . ' ' + $arr['body'] = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' . ' ' . $bodyverb . ' ' + . '[url=' . $item['author-link'] . ']' . $item['author-name'] . t('\'s') . '[/url]' . ' ' . '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]' ; $arr['verb'] = $activity; |