summaryrefslogtreecommitdiffstats
path: root/lib/class/vauth.class.php
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2011-09-12 10:25:27 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2011-09-12 10:25:27 -0400
commit3b296619c0e0a199f07ac7bf9c901bc9e4e18d12 (patch)
tree89d676f4e82b7021b515e188b23fc6d3bfec55b5 /lib/class/vauth.class.php
parent6b745c7ac9f53eab0f388d45b3f3af94a669e119 (diff)
downloadampache-3b296619c0e0a199f07ac7bf9c901bc9e4e18d12.tar.gz
ampache-3b296619c0e0a199f07ac7bf9c901bc9e4e18d12.tar.bz2
ampache-3b296619c0e0a199f07ac7bf9c901bc9e4e18d12.zip
Null is an acceptable session auth type if use_auth=false. FS#182.
Diffstat (limited to 'lib/class/vauth.class.php')
-rw-r--r--lib/class/vauth.class.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/class/vauth.class.php b/lib/class/vauth.class.php
index ffc82508..92b00a6f 100644
--- a/lib/class/vauth.class.php
+++ b/lib/class/vauth.class.php
@@ -379,8 +379,11 @@ class vauth {
$key = Dba::escape($key);
$time = time();
// Build a list of enabled authentication types
- $enabled_types = implode("','",
- Config::get('auth_methods'));
+ $types = Config::get('auth_methods');
+ if (!Config::get('use_auth')) {
+ $types[] = '';
+ }
+ $enabled_types = implode("','", $types);
$sql = "SELECT * FROM `session` WHERE " .
"`id`='$key' AND `expire` > '$time' " .
"AND `type` IN('$enabled_types')";