]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-cvsserver.perl
t1430: remove refs using test-tool
[thirdparty/git.git] / git-cvsserver.perl
index ed035f32c29d516164622994095122afe9f49e8e..64319bed43f2b4916910480223f1089ce90990ef 100755 (executable)
@@ -222,10 +222,11 @@ if ($state->{method} eq 'pserver') {
         open my $passwd, "<", $authdb or die $!;
         while (<$passwd>) {
             if (m{^\Q$user\E:(.*)}) {
-                if (crypt($user, descramble($password)) eq $1) {
+                my $hash = crypt(descramble($password), $1);
+                if (defined $hash and $hash eq $1) {
                     $auth_ok = 1;
                 }
-            };
+            }
         }
         close $passwd;