mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-10-04 00:02:57 +00:00
access: lookup: avoid reading user.cfg from cfs unnecessarily
Given that the information is only needed for case-sensitive realms, move the read into the conditional. No functional changes. Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
This commit is contained in:
parent
1471e1e822
commit
6e0d55a587
@ -1223,9 +1223,9 @@ sub lookup_username {
|
||||
my $realm = $2;
|
||||
my $domain_cfg = cfs_read_file("domains.cfg");
|
||||
my $casesensitive = $domain_cfg->{ids}->{$realm}->{'case-sensitive'} // 1;
|
||||
my $usercfg = cfs_read_file('user.cfg');
|
||||
|
||||
if (!$casesensitive) {
|
||||
my $usercfg = cfs_read_file('user.cfg');
|
||||
my @matches = grep { lc $username eq lc $_ } (keys %{$usercfg->{users}});
|
||||
|
||||
die "ambiguous case insensitive match of username '$username', cannot safely grant access!\n"
|
||||
|
Loading…
Reference in New Issue
Block a user