]> git.mxchange.org Git - friendica.git/blobdiff - mod/salmon.php
Catch HTTPExceptions in App::runFrontend()
[friendica.git] / mod / salmon.php
index 1538a1c68cc313fda9f9ffb9529e4d1f16ae5101..eef25107626ac6754339780bbd995c5a61e6aeb9 100644 (file)
@@ -14,8 +14,6 @@ use Friendica\Protocol\Salmon;
 use Friendica\Util\Crypto;
 use Friendica\Util\Strings;
 
-require_once 'include/items.php';
-
 function salmon_post(App $a, $xml = '') {
 
        if (empty($xml)) {
@@ -24,7 +22,7 @@ function salmon_post(App $a, $xml = '') {
 
        Logger::log('new salmon ' . $xml, Logger::DATA);
 
-       $nick       = (($a->argc > 1) ? Strings::removeTags(trim($a->argv[1])) : '');
+       $nick       = (($a->argc > 1) ? Strings::escapeTags(trim($a->argv[1])) : '');
        $mentions   = (($a->argc > 2 && $a->argv[2] === 'mention') ? true : false);
 
        $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 AND `account_removed` = 0 LIMIT 1",
@@ -150,9 +148,9 @@ function salmon_post(App $a, $xml = '') {
                                                AND `uid` = %d LIMIT 1",
                DBA::escape(Protocol::OSTATUS),
                DBA::escape(Protocol::DFRN),
-               DBA::escape(normalise_link($author_link)),
+               DBA::escape(Strings::normaliseLink($author_link)),
                DBA::escape($author_link),
-               DBA::escape(normalise_link($author_link)),
+               DBA::escape(Strings::normaliseLink($author_link)),
                intval($importer['uid'])
        );