- Fixed case sensitive authentication tokens for Redis DSNs, closed #940
This commit is contained in:
@@ -914,7 +914,7 @@ class Setup extends Controller {
|
||||
// -> the DSN format is not the same, convert URL format into DSN
|
||||
if(
|
||||
strtolower(session_module_name()) == 'redis' &&
|
||||
($parts = parse_url(strtolower(session_save_path())))
|
||||
($parts = parse_url(session_save_path()))
|
||||
){
|
||||
// parse URL parameters
|
||||
parse_str((string)$parts['query'], $params);
|
||||
|
||||
@@ -577,7 +577,7 @@ class Config extends \Prefab {
|
||||
*/
|
||||
static function parseDSN(string $dsn, ?array &$conf = []) : bool {
|
||||
// reset reference
|
||||
if($matches = (bool)preg_match('/^(\w+)\h*=\h*(.+)/', strtolower(trim($dsn)), $parts)){
|
||||
if($matches = (bool)preg_match('/^(\w+)\h*=\h*(.+)/', trim($dsn), $parts)){
|
||||
$conf['type'] = $parts[1];
|
||||
if($conf['type'] == 'redis'){
|
||||
[$conf['host'], $conf['port'], $conf['db'], $conf['auth']] = explode(':', $parts[2]) + [1 => 6379, 2 => null, 3 => null];
|
||||
|
||||
Reference in New Issue
Block a user