From e5a988f0b58f3a2319863580817dc22545e2c498 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 30 May 2012 01:52:58 -0700 Subject: fix private photos that also have a size specification --- include/items.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index c6d852fe7..8324d4bdd 100644 --- a/include/items.php +++ b/include/items.php @@ -2933,8 +2933,8 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) { logger('fix_private_photos', LOGGER_DEBUG); $site = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')); - if(preg_match("/\[img\](.*?)\[\/img\]/is",$s,$matches)) { - $image = $matches[1]; + if(preg_match("/\[img(.*?)\](.*?)\[\/img\]/is",$s,$matches)) { + $image = $matches[2]; logger('fix_private_photos: found photo ' . $image, LOGGER_DEBUG); if(stristr($image , $site . '/photo/')) { $replace = false; -- cgit v1.2.3 From f0cf0ebb485432b444b1d85843385ebfda0260fd Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 30 May 2012 19:11:01 -0700 Subject: prevent email from leaking in feeds --- include/items.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 8324d4bdd..0ed16217f 100644 --- a/include/items.php +++ b/include/items.php @@ -180,6 +180,10 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) foreach($items as $item) { + // prevent private email from leaking. + if($item['network'] === NETWORK_MAIL) + continue; + // public feeds get html, our own nodes use bbcode if($public_feed) { -- cgit v1.2.3