diff options
author | Friendika <info@friendika.com> | 2011-06-06 16:26:11 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-06-06 16:26:11 -0700 |
commit | c0094aa4f865defe8be63963b32f69d05e258f48 (patch) | |
tree | ea8938f418f5776fb32fb927069d982393da83e3 /mod | |
parent | ccf4e3eee5f01caad487cc42607c6cde710c4f5d (diff) | |
download | volse-hubzilla-c0094aa4f865defe8be63963b32f69d05e258f48.tar.gz volse-hubzilla-c0094aa4f865defe8be63963b32f69d05e258f48.tar.bz2 volse-hubzilla-c0094aa4f865defe8be63963b32f69d05e258f48.zip |
strict privacy mode (Friendika-Z) - refuse to talk to networks with privacy issues
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_request.php | 10 | ||||
-rw-r--r-- | mod/follow.php | 5 | ||||
-rw-r--r-- | mod/salmon.php | 5 |
3 files changed, 14 insertions, 6 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 537a7a497..338dc9cf1 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -626,19 +626,21 @@ function dfrn_request_content(&$a) { else $tpl = get_markup_template('auto_request.tpl'); + $prv = get_config('system','strict_privacy'); + $o .= replace_macros($tpl,array( '$header' => t('Friend/Connection Request'), - '$desc' => t('Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca'), + '$desc' => t('Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo') . (($prv) ? ', testuser@identi.ca' : ''), '$pls_answer' => t('Please answer the following:'), - '$does_know' => t('Does $name know you?'), + '$does_know' => sprintf( t('Does %s know you?'),$a->profile['name']), '$yes' => t('Yes'), '$no' => t('No'), '$add_note' => t('Add a personal note:'), '$page_desc' => t("Please enter your 'Identity Address' from one of the following supported social networks:"), '$friendika' => t('Friendika'), - '$statusnet' => t('StatusNet/Federated Social Web'), + '$statusnet' => (($prv) ? t('StatusNet/Federated Social Web') : ''), '$private_net' => t("Private \x28secure\x29 network"), - '$public_net' => t("Public \x28insecure\x29 network"), + '$public_net' => (($prv) ? t("Public \x28insecure\x29 network") : ''), '$your_address' => t('Your Identity Address:'), '$submit' => t('Submit Request'), '$cancel' => t('Cancel'), diff --git a/mod/follow.php b/mod/follow.php index 9a9f9da7d..31cfcfb64 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -22,10 +22,8 @@ function follow_post(&$a) { // NOTREACHED } - $ret = probe_url($url); - if($ret['network'] === NETWORK_DFRN) { if(strlen($a->path)) $myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']); @@ -36,6 +34,9 @@ function follow_post(&$a) { // NOTREACHED } + elseif(get_config('system','strict_privacy')) { + unset($ret['notify']); + } // do we have enough information? diff --git a/mod/salmon.php b/mod/salmon.php index c2f76aa0a..bf33033d8 100644 --- a/mod/salmon.php +++ b/mod/salmon.php @@ -192,6 +192,11 @@ function salmon_post(&$a) { // NOTREACHED } + // Check if we're allowed to talk to insecure networks + + if(get_config('system','strict_privacy')) + salmon_return(400); + require_once('include/items.php'); // Placeholder for hub discovery. We shouldn't find any hubs |