mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 05:44:36 +02:00
Don't rely on case sensitive usernames in preferences stored in INI files
refs #11051
This commit is contained in:
parent
2e400ba654
commit
001c63e376
@ -472,11 +472,17 @@ class Config implements Countable, Iterator, Selectable
|
||||
$filename = $type . 's.ini';
|
||||
}
|
||||
|
||||
return static::resolvePath(
|
||||
($username ? 'preferences' . DIRECTORY_SEPARATOR . $username : 'navigation')
|
||||
. DIRECTORY_SEPARATOR
|
||||
. $filename
|
||||
);
|
||||
if ($username) {
|
||||
$path = static::resolvePath(implode(DIRECTORY_SEPARATOR, array('preferences', $username, $filename)));
|
||||
if (realpath($path) === false) {
|
||||
$path = static::resolvePath(implode(DIRECTORY_SEPARATOR, array(
|
||||
'preferences', strtolower($username), $filename
|
||||
)));
|
||||
}
|
||||
} else {
|
||||
$path = static::resolvePath('navigation' . DIRECTORY_SEPARATOR . $filename);
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user