From 2562b5a00bc96694ba6f25bc8aa6064521d2b8b5 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sat, 15 Nov 2008 06:41:41 +0000 Subject: add in require_localnet_session configuration --- play/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'play/index.php') diff --git a/play/index.php b/play/index.php index 6c790f88..d8093980 100644 --- a/play/index.php +++ b/play/index.php @@ -72,7 +72,11 @@ if (make_bool($GLOBALS['user']->disabled)) { // If require session is set then we need to make sure we're legit if (Config::get('require_session')) { - if(!Stream::session_exists($sid)) { + if (!Config::get('require_localnet_session') AND Access::check_network('network',$_SERVER['REMOTE_ADDR'],$GLOBALS['user']->id,'5')) { + // Localnet defined IP and require localnot session has been turned off we let this one through + debug_event('LocalNet','Streaming Access Granted to Localnet defined IP ' . $_SERVER['REMOTE_ADDR'],'5'); + } + elseif(!Stream::session_exists($sid)) { debug_event('session_expired',"Streaming Access Denied: " . $GLOBALS['user']->username . "'s session has expired",'3'); die(_("Session Expired: please log in again at") . " " . Config::get('web_path') . "/login.php"); } -- cgit