[PATCH 3/5] git-cvsserver: take care of empty passwords

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not try to descramble them.
---
 git-cvsserver.perl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 10dcc65..e842d77 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -241,11 +241,15 @@ if ($state->{method} eq 'pserver') {
            exit 1;
        }

+        if (length($password) > 0) {
+            $password = descramble($password);
+        }
+
        my $auth_ok;
        open my $passwd, "<", $authdb or die $!;
        while (<$passwd>) {
            if (m{^\Q$user\E:(.*)}) {
-                if (crypt($user, descramble($password)) eq $1) {
+                if (crypt($user, $password) eq $1) {
                    $auth_ok = 1;
                }
            };
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]