Skip to contentSkip to conversation

git-cvsserver: do not try to descramble empty password

PATCH In review Áshin László 1 participant 1 message Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 3/4 git-cvsserver: do not try to descramble empty password

In reply to a message not in the archive

 git-cvsserver.perl |    6 +++++-

 1 files changed, 5 insertions(+), 1 deletions(-)
git-cvsserver.perl +0 -0
index 46e5fdb..01c5b21 100755
@@ -235,11 +235,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.2.rc1.dirty