aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2014-02-14 11:08:05 +0100
committerzottel <github@zottel.net>2014-02-14 11:08:05 +0100
commit7a6fcd9ea42ffc5877721589d315d3dbd71560ff (patch)
tree5244c0a23f70b9861b76365d4199876fd764e1bb /mod
parentb00f24ad75e9cf0c4fdd7d044bcadc5b4b6b1633 (diff)
downloadvolse-hubzilla-7a6fcd9ea42ffc5877721589d315d3dbd71560ff.tar.gz
volse-hubzilla-7a6fcd9ea42ffc5877721589d315d3dbd71560ff.tar.bz2
volse-hubzilla-7a6fcd9ea42ffc5877721589d315d3dbd71560ff.zip
make sure the user can't inadvertently send a post with @!-tags to an
unintended audience because he had browsed the Matrix by collection or by contact
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index 173198f4a..54c9f128a 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -495,6 +495,7 @@ function item_post(&$a) {
$private_forum = false;
if(count($tags)) {
+ $first_access_tag = true;
foreach($tags as $tag) {
// If we already tagged 'Robert Johnson', don't try and tag 'Robert'.
@@ -514,6 +515,11 @@ function item_post(&$a) {
logger('handle_tag: ' . print_r($success,tue), LOGGER_DEBUG);
if(($access_tag) && (! $parent_item)) {
logger('access_tag: ' . $tag . ' ' . print_r($access_tag,true), LOGGER_DEBUG);
+ if ($first_access_tag) {
+ $str_contact_allow = '';
+ $str_group_allow = '';
+ $first_access_tag = false;
+ }
if(strpos($access_tag,'cid:') === 0) {
$str_contact_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = '';