From 46b15d42c6d9d587e257737848fc196b98eddfcd Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 15 Feb 2021 11:28:58 -0700 Subject: [PATCH] editproj.cgi: if password validates always enable protected fields Regardless of whether or not there are any other errors in the submitted data, if the password was valid, the protected fields are always enabled. Signed-off-by: Kyle J. McKay --- cgi/editproj.cgi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cgi/editproj.cgi b/cgi/editproj.cgi index 8b810b2..22b2499 100755 --- a/cgi/editproj.cgi +++ b/cgi/editproj.cgi @@ -90,10 +90,11 @@ if (($y0 eq 'Update' || $y0 eq 'View All' || $y0 eq 'Restart Mirroring') && $cgi $gcgi->err("Session has timed out or is invalid, please try again."); } # submitted, let's see - $proj->cgi_fill($gcgi, $y0 eq 'View All') || $y0 eq 'View All' or last; - if ($proj->authenticate($gcgi)) { - $protok = 1; - $y0 eq 'View All' and last; + my $fillok = $proj->cgi_fill($gcgi, 1); + my $authok = $proj->authenticate($gcgi); + $authok and $protok = 1; + $y0 eq 'View All' and last; + if (!$gcgi->err_check && $authok) { $proj->update or last; print "

Project successfully updated at $ts.

\n"; if ($proj->{clone_failed}) { -- 2.11.4.GIT