X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Facl.php;h=86eafe29028db053ed55d380db8869fa982ffb15;hb=3fc5c1ad840f98926319478a855dab3686a0ace3;hp=48c45f2934bd3009d3dda04a3cecc1b666fc634e;hpb=a97b540ebb3f1d5bb5c18b4c0fb631443d03b5a7;p=friendica.git diff --git a/mod/acl.php b/mod/acl.php index 48c45f2934..86eafe2902 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -6,11 +6,13 @@ use Friendica\App; use Friendica\Content\Widget; use Friendica\Core\ACL; use Friendica\Core\Addon; +use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Database\DBA; use Friendica\Model\Contact; use Friendica\Model\Item; use Friendica\Util\Proxy as ProxyUtils; +use Friendica\Util\Strings; require_once 'include/dba.php'; @@ -34,7 +36,7 @@ function acl_content(App $a) $search = $_REQUEST['query']; } - logger("Searching for ".$search." - type ".$type." conversation ".$conv_id, LOGGER_DEBUG); + Logger::log("Searching for ".$search." - type ".$type." conversation ".$conv_id, Logger::DEBUG); if ($search != '') { $sql_extra = "AND `name` LIKE '%%" . DBA::escape($search) . "%%'"; @@ -125,7 +127,7 @@ function acl_content(App $a) $groups[] = [ 'type' => 'g', 'photo' => 'images/twopeople.png', - 'name' => htmlentities($g['name']), + 'name' => htmlspecialchars($g['name']), 'id' => intval($g['id']), 'uids' => array_map('intval', explode(',', $g['uids'])), 'link' => '', @@ -187,7 +189,7 @@ function acl_content(App $a) ); } elseif ($type == 'x') { // autocomplete for global contact search (e.g. navbar search) - $search = notags(trim($_REQUEST['search'])); + $search = Strings::escapeTags(trim($_REQUEST['search'])); $mode = $_REQUEST['smode']; $r = ACL::contactAutocomplete($search, $mode); @@ -196,7 +198,7 @@ function acl_content(App $a) foreach ($r as $g) { $contacts[] = [ 'photo' => ProxyUtils::proxifyUrl($g['photo'], false, ProxyUtils::SIZE_MICRO), - 'name' => $g['name'], + 'name' => htmlspecialchars($g['name']), 'nick' => defaults($g, 'addr', $g['url']), 'network' => $g['network'], 'link' => $g['url'], @@ -218,7 +220,7 @@ function acl_content(App $a) $entry = [ 'type' => 'c', 'photo' => ProxyUtils::proxifyUrl($g['micro'], false, ProxyUtils::SIZE_MICRO), - 'name' => htmlentities($g['name']), + 'name' => htmlspecialchars($g['name']), 'id' => intval($g['id']), 'network' => $g['network'], 'link' => $g['url'], @@ -279,7 +281,7 @@ function acl_content(App $a) $unknown_contacts[] = [ 'type' => 'c', 'photo' => ProxyUtils::proxifyUrl($contact['micro'], false, ProxyUtils::SIZE_MICRO), - 'name' => htmlentities($contact['name']), + 'name' => htmlspecialchars($contact['name']), 'id' => intval($contact['cid']), 'network' => $contact['network'], 'link' => $contact['url'],