Skip to contentSkip to conversation

Do not scramble password read from .cvspass

PATCH In review Pascal Obry 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not scramble password read from .cvspass

Passwords stored in .cvspass are already scrambled, we do not want to scramble them twice. Only passwords read from the command line are scrambled.

This fixes a regression introduced by:
b2139dbd72d16e40eddfd5b9ad1314703b39fe65

---
 git-cvsimport.perl |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
git-cvsimport.perl +4 -1
index 593832d..c5cdcae 100755
@@ -238,7 +238,10 @@ sub conn {
                }
                my $rr = ":pserver:$user\@$serv:$port$repo";
 
-               unless ($pass) {
+               if ($pass) {
+                   $pass = $self->_scramble($pass);
+               } else
+               {
                        open(H,$ENV{'HOME'}."/.cvspass") and do {
                                # 

:pserver:[email protected]:/cvsroot/zmailer Ah<Z

                                while (<H>) {
@@ -253,8 +256,6 @@ sub conn {
                        };
                }

- $pass = $self->_scramble($pass);
-

                my ($s, $rep);
                if ($proxyhost) {

--
1.6.4.2.253.g0b1fac

Signature · 8 lines
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
#1 lore raw
Quoted 9 lines · Pascal Obry

Passwords stored in .cvspass are already scrambled, we do not want to scramble them twice. Only passwords read from the command line are scrambled.

This fixes a regression introduced by:
b2139dbd72d16e40eddfd5b9ad1314703b39fe65

---

Thanks, Pascal. This bug is not in any tagged release yet, and I am happy you caught it before -rc0 ;-)

Dirk, does the patch look Ok to you?

Quoted 31 lines
 git-cvsimport.perl |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
git-cvsimport.perl +4 -1
index 593832d..c5cdcae 100755
@@ -238,7 +238,10 @@ sub conn {
                }
                my $rr = ":pserver:$user\@$serv:$port$repo";
 
-               unless ($pass) {
+               if ($pass) {
+                   $pass = $self->_scramble($pass);
+               } else
+               {
                        open(H,$ENV{'HOME'}."/.cvspass") and do {
                                #

:pserver:[email protected]:/cvsroot/zmailer Ah<Z

                                while (<H>) {
git-cvsimport.perl +0 -3
@@ -253,8 +256,6 @@ sub conn {
                        };
                }
 
-               $pass = $self->_scramble($pass);
-
                my ($s, $rep);
                if ($proxyhost) {
 
--

1.6.4.2.253.g0b1fac

#2 lore raw

Hi Junio,

Quoted 1 line · Junio C Hamano

Dirk, does the patch look Ok to you?

The patch looks fine :-)

Ciao,
Dirk

Quoted 33 lines
Quoted 32 lines

 git-cvsimport.perl |    7 ++++---

 1 files changed, 4 insertions(+), 3 deletions(-)
git-cvsimport.perl +4 -1
index 593832d..c5cdcae 100755
@@ -238,7 +238,10 @@ sub conn {
                 }
                 my $rr = ":pserver:$user\@$serv:$port$repo";
 
-               unless ($pass) {
+               if ($pass) {
+                   $pass = $self->_scramble($pass);
+               } else
+               {
                         open(H,$ENV{'HOME'}."/.cvspass") and do {
                                 #

:pserver:[email protected]:/cvsroot/zmailer Ah<Z while (<H>) {

git-cvsimport.perl +0 -3
@@ -253,8 +256,6 @@ sub conn {
                         };
                 }
 
-               $pass = $self->_scramble($pass);
-
                 my ($s, $rep);
                 if ($proxyhost) {
 
--

1.6.4.2.253.g0b1fac