summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/access.class.php13
-rw-r--r--play/index.php2
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/class/access.class.php b/lib/class/access.class.php
index 388367f7..0182a45d 100644
--- a/lib/class/access.class.php
+++ b/lib/class/access.class.php
@@ -167,11 +167,16 @@ class Access {
*/
public static function check_network($type,$ip='',$user,$level,$key='') {
- // They aren't using access control
- // lets just keep on trucking
if (!Config::get('access_control')) {
- return true;
- }
+ switch ($type) {
+ case 'interface':
+ case 'stream':
+ return true;
+ break;
+ default:
+ return false;
+ } // end switch
+ } // end if access control is turned off
// Clean incomming variables
$ip = $ip ? sprintf("%u",ip2long($ip)) : sprintf("%u",ip2long($_SERVER['REMOTE_ADDR']));
diff --git a/play/index.php b/play/index.php
index 5e56d05e..d8093980 100644
--- a/play/index.php
+++ b/play/index.php
@@ -72,7 +72,7 @@ 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 (!Config::get('require_localnet_session') AND Config::get('access_control') AND Access::check_network('network',$_SERVER['REMOTE_ADDR'],$GLOBALS['user']->id,'5')) {
+ 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');
}