summaryrefslogtreecommitdiffstats
path: root/play
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-11-15 06:41:41 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-11-15 06:41:41 +0000
commit2562b5a00bc96694ba6f25bc8aa6064521d2b8b5 (patch)
treeddc9e062bb85c9d4698693d249db90ea8eec390d /play
parentd1f96470900c74bdb4c9101f309f10697a3e6aa3 (diff)
downloadampache-2562b5a00bc96694ba6f25bc8aa6064521d2b8b5.tar.gz
ampache-2562b5a00bc96694ba6f25bc8aa6064521d2b8b5.tar.bz2
ampache-2562b5a00bc96694ba6f25bc8aa6064521d2b8b5.zip
add in require_localnet_session configuration
Diffstat (limited to 'play')
-rw-r--r--play/index.php6
1 files changed, 5 insertions, 1 deletions
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");
}