diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-11-15 06:41:41 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-11-15 06:41:41 +0000 |
commit | 2562b5a00bc96694ba6f25bc8aa6064521d2b8b5 (patch) | |
tree | ddc9e062bb85c9d4698693d249db90ea8eec390d /lib/class/access.class.php | |
parent | d1f96470900c74bdb4c9101f309f10697a3e6aa3 (diff) | |
download | ampache-2562b5a00bc96694ba6f25bc8aa6064521d2b8b5.tar.gz ampache-2562b5a00bc96694ba6f25bc8aa6064521d2b8b5.tar.bz2 ampache-2562b5a00bc96694ba6f25bc8aa6064521d2b8b5.zip |
add in require_localnet_session configuration
Diffstat (limited to 'lib/class/access.class.php')
-rw-r--r-- | lib/class/access.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/class/access.class.php b/lib/class/access.class.php index 113735ae..388367f7 100644 --- a/lib/class/access.class.php +++ b/lib/class/access.class.php @@ -165,7 +165,7 @@ class Access { * and then returns true or false if they have access to this * the IP is passed as a dotted quad */ - public static function check_network($type,$ip,$user,$level,$key='') { + public static function check_network($type,$ip='',$user,$level,$key='') { // They aren't using access control // lets just keep on trucking @@ -174,7 +174,7 @@ class Access { } // Clean incomming variables - $ip = sprintf("%u",ip2long($ip)); + $ip = $ip ? sprintf("%u",ip2long($ip)) : sprintf("%u",ip2long($_SERVER['REMOTE_ADDR'])); $user = Dba::escape($user); $key = Dba::escape($key); $level = Dba::escape($level); |