X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FAuth%2FPVE.pm;h=71479979eea163f47787f9d2e96fe0d869121f55;hp=7f03b9e531881dd976499353975437bec04aaaa3;hb=62af314a96068a16311be6e04788fb51bc66855b;hpb=7d2df2ef843095765b3e4a2da5f274ee21d28835 diff --git a/PVE/Auth/PVE.pm b/PVE/Auth/PVE.pm index 7f03b9e..7147997 100755 --- a/PVE/Auth/PVE.pm +++ b/PVE/Auth/PVE.pm @@ -19,11 +19,9 @@ sub parse_shadow_passwd { my $shadow = {}; - while ($raw && $raw =~ s/^(.*?)(\n|$)//) { + while ($raw =~ /^\s*(.+?)\s*$/gm) { my $line = $1; - next if $line =~ m/^\s*$/; # skip empty lines - if ($line !~ m/^\S+:\S+:$/) { warn "pve shadow password: ignore invalid line $.\n"; next;