mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +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';
|
$filename = $type . 's.ini';
|
||||||
}
|
}
|
||||||
|
|
||||||
return static::resolvePath(
|
if ($username) {
|
||||||
($username ? 'preferences' . DIRECTORY_SEPARATOR . $username : 'navigation')
|
$path = static::resolvePath(implode(DIRECTORY_SEPARATOR, array('preferences', $username, $filename)));
|
||||||
. DIRECTORY_SEPARATOR
|
if (realpath($path) === false) {
|
||||||
. $filename
|
$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