From 05612a8a7782e8da569e18dc41001235e2b514e6 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 21 Jul 2013 22:39:21 -0700 Subject: make zot_finger more bulletproof --- include/items.php | 2 +- include/zot.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index eb58f9f0a..863fa419b 100755 --- a/include/items.php +++ b/include/items.php @@ -1437,7 +1437,7 @@ function item_store($arr,$force_parent = false) { intval($arr['uid']) ); - if(count($r)) { + if($r) { // is the new message multi-level threaded? // even though we don't support it now, preserve the info diff --git a/include/zot.php b/include/zot.php index b89992a42..829d219b9 100644 --- a/include/zot.php +++ b/include/zot.php @@ -164,6 +164,11 @@ function zot_finger($webbie,$channel) { $xchan_addr = $address . '@' . $host; + if((! $address) || (! $xchan_addr)) { + logger('zot_finger: no address :' . $webbie); + return array('success' => false); + } + $r = q("select xchan.*, hubloc.* from xchan left join hubloc on xchan_hash = hubloc_hash where xchan_addr = '%s' and (hubloc_flags & %d) limit 1", -- cgit v1.2.3