diff --git a/tests/common/compare_file.pl b/tests/common/compare_file.pl index 349f9457..dd0ba1f4 100755 --- a/tests/common/compare_file.pl +++ b/tests/common/compare_file.pl @@ -8,9 +8,12 @@ my $file = join "", ; my $today = int(time()/(24*3600)); $template =~ s/\@TODAY\@/$today/g; -if ($template =~ m/(.*):\@PASS_DES (.*)\@:/m) { - my $user = $1; - my $pass = $2; +my $tmp = $template; +while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_DES ([^:]*)\@:(.*)$/s) { + my $user = $2; + my $pass = $3; + $tmp = $4; + if ($file =~ m/^$user:/m) { $file =~ s/^$user:([^:]*):(.*)$/$user:\@PASS_DES $pass\@:$2/m; my $cryptpass = $1; # Check the password