From 664d306e37f5bd9587e186d03513c9b4f7c8683b Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 26 Aug 2007 13:56:06 +0200 Subject: [PATCH] Double password entering in editproj as well --- cgi/Git/RepoCGI.pm | 3 +++ cgi/editproj.cgi | 1 + cgi/regproj.cgi | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cgi/Git/RepoCGI.pm b/cgi/Git/RepoCGI.pm index 0b6a326..9f768ca 100644 --- a/cgi/Git/RepoCGI.pm +++ b/cgi/Git/RepoCGI.pm @@ -463,6 +463,9 @@ sub cgi_fill { $self->{crypt} = scrypt($pwd); } + if ($cgi->param('pwd2') and $pwd ne $cgi->param('pwd2')) + or $repo->err("Our high-paid security consultants have determined that the admin passwords you have entered do not match each other."); + $self->{cpwd} = $cgi->param('cpwd'); $self->{email} = $repo->wparam('email'); diff --git a/cgi/editproj.cgi b/cgi/editproj.cgi index 0933815..c494bcb 100755 --- a/cgi/editproj.cgi +++ b/cgi/editproj.cgi @@ -63,6 +63,7 @@ print <Project name: $h{name}.git

Admin password:

New admin password: (leave empty to keep it at the current value)

+

New admin password (retype):

E-mail contact:

Repository URL:

Description:

diff --git a/cgi/regproj.cgi b/cgi/regproj.cgi index 4b481ea..5a300fb 100755 --- a/cgi/regproj.cgi +++ b/cgi/regproj.cgi @@ -24,9 +24,6 @@ if ($cgi->param('mode')) { $name =~ /\.git$/ and $repo->err("Project name should not end with .git - I'll add that automagically."); - ($cgi->param('pwd') eq $cgi->param('pwd2')) - or $repo->err("Our high-paid security consultants have determined that the admin passwords you have entered do not match each other."); - my $mirror = $cgi->param('mode') eq 'mirror'; my $proj = Git::RepoCGI::Project->ghost($name, $mirror); if ($proj->cgi_fill($repo)) { -- 2.11.4.GIT