git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
ÁLÁshin László <ashinlaszlo@gmail.com>
Date
Jul 6, 2010, 17:37 UTC
Message-ID
<AANLkTinpjbOStczVo7NaPlxqyAh_32kLy0kWKc_AsLiI@mail.gmail.com>
In-Reply-To
<3594077658746039911@unknownmsgid>
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
Next: Ævar Arnfjörð Bjarmason
Message 1 of 3 in “git-cvsserver: take care of empty passwords”
  1. 3/5 git-cvsserver: take care of empty passwordsÁshin László, Jul 6, 2010
  2. Ævar Arnfjörð BjarmasonJul 6, 2010
  3. Áshin LászlóJul 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.