]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
provide disclosure warning on private network page
[friendica.git] / mod / network.php
index 9d5fb5b84ab6dca480d72895eae59f0989ce1b46..3e6c5dc4a5821148f84260aed9488d40e25ea3e3 100644 (file)
@@ -212,13 +212,17 @@ function network_content(&$a, $update = 0) {
        }
        elseif($cid) {
 
-               $r = q("SELECT `id`,`name` FROM `contact` WHERE `id` = %d 
+               $r = q("SELECT `id`,`name`,`network`,`writable` FROM `contact` WHERE `id` = %d 
                                AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
                        intval($cid)
                );
                if(count($r)) {
                        $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `contact-id` IN ( " . intval($cid) . " )) ";
                        $o = '<h2>' . t('Contact: ') . $r[0]['name'] . '</h2>' . $o;
+                       if($r[0]['network'] !== NETWORK_MAIL && $r[0]['network'] !== NETWORK_DFRN && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
+                               notice( t('Private messages to this person are at risk of public disclosure.') . EOL);
+                       }
+
                }
                else {
                        notice( t('Invalid contact.') . EOL);