mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:40:17 +00:00
"firewall" setting - block all public pages from the public if configured to do so
This commit is contained in:
parent
1d4791d38c
commit
9e19eef194
7 changed files with 41 additions and 1 deletions
2
boot.php
2
boot.php
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
define ( 'FRIENDIKA_VERSION', '2.1.955' );
|
define ( 'FRIENDIKA_VERSION', '2.1.956' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1053 );
|
define ( 'DB_UPDATE_VERSION', 1053 );
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,10 @@ function dfrn_poll_init(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($dfrn_id === '') && (! x($_POST,'dfrn_id')) && ($a->argc > 1)) {
|
if(($dfrn_id === '') && (! x($_POST,'dfrn_id')) && ($a->argc > 1)) {
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] );
|
logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] );
|
||||||
header("Content-type: application/atom+xml");
|
header("Content-type: application/atom+xml");
|
||||||
$o = get_feed_for($a, '', $a->argv[1],$last_update);
|
$o = get_feed_for($a, '', $a->argv[1],$last_update);
|
||||||
|
|
|
@ -13,6 +13,12 @@ function directory_post(&$a) {
|
||||||
|
|
||||||
|
|
||||||
function directory_content(&$a) {
|
function directory_content(&$a) {
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
notice( t('Public access denied.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
$o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
|
$o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
|
||||||
if(x($_SESSION,'theme'))
|
if(x($_SESSION,'theme'))
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
|
|
||||||
function display_content(&$a) {
|
function display_content(&$a) {
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
notice( t('Public access denied.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
require_once("include/bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
|
|
|
@ -6,6 +6,10 @@ require_once('include/bbcode.php');
|
||||||
|
|
||||||
function photos_init(&$a) {
|
function photos_init(&$a) {
|
||||||
|
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
if($a->argc > 1) {
|
if($a->argc > 1) {
|
||||||
|
@ -657,6 +661,12 @@ function photos_content(&$a) {
|
||||||
// photos/name/image/xxxxx/edit
|
// photos/name/image/xxxxx/edit
|
||||||
|
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
notice( t('Public access denied.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
function profile_init(&$a) {
|
function profile_init(&$a) {
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user()))
|
||||||
|
return;
|
||||||
|
|
||||||
if($a->argc > 1)
|
if($a->argc > 1)
|
||||||
$which = $a->argv[1];
|
$which = $a->argv[1];
|
||||||
else {
|
else {
|
||||||
|
@ -48,6 +51,13 @@ function profile_init(&$a) {
|
||||||
|
|
||||||
function profile_content(&$a, $update = 0) {
|
function profile_content(&$a, $update = 0) {
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
notice( t('Public access denied.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require_once("include/bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
|
|
|
@ -9,6 +9,11 @@ function search_post(&$a) {
|
||||||
|
|
||||||
function search_content(&$a) {
|
function search_content(&$a) {
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
notice( t('Public access denied.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
require_once("include/bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
|
|
Loading…
Reference in a new issue