]> git.proxmox.com Git - pve-access-control.git/blobdiff - PVE/AccessControl.pm
improve parse_user_config, parse_shadow_config
[pve-access-control.git] / PVE / AccessControl.pm
index 2b7044e2393039aab16dad482e76b0cfd6c29b76..955e143586017a63b3acdfa1590f17cafced6624 100644 (file)
@@ -708,11 +708,8 @@ sub parse_user_config {
 
     userconfig_force_defaults($cfg);
 
-    while ($raw && $raw =~ s/^(.*?)(\n|$)//) {
+    while ($raw =~ /^\s*(.+?)\s*$/gm) {
        my $line = $1;
-
-       next if $line =~ m/^\s*$/; # skip empty lines
-
        my @data;
 
        foreach my $d (split (/:/, $line)) {