checksetup.pl gives inadequate error message for administrator password prompt

RESOLVED FIXED in Bugzilla 2.16

Status

()

Bugzilla
Installation & Upgrading
--
minor
RESOLVED FIXED
16 years ago
6 years ago

People

(Reporter: Jerry Fowler, Assigned: Vlad Dascalu)

Tracking

2.16.4
Bugzilla 2.16
Bug Flags:
approval +

Details

(Whiteboard: [fixed in 2.16.5] [does not affect trunk], URL)

Attachments

(1 attachment, 1 obsolete attachment)

933 bytes, patch
justdave
: review+
Details | Diff | Splinter Review
(Reporter)

Description

16 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 5.14; Mac_PowerPC)
Build Identifier: irrelevant

checksetup.pl's error message for the administrator password prompt
does not explain why it is rejecting a non-zero-length password.

Reproducible: Always

Steps to Reproduce:
1.Perform initial install of bugzilla
2.Run checksetup.pl
3.At administrator password prompt, enter, for example, a string
containing a period, space, or special character

Actual Results:  
Endless loop of
The password must be 3-16 characters in length.
Followed by frustrated read of perl code to determine problem.

Expected Results:  
Given the error message proposed in the diff below, or accepted
a more complex set of characters.

Here is a proposed solution, presented as a diff:

% diff bugzilla-2.16/checksetup.pl revised-checksetup.pl
1993c1993
<           print "The password must be 3-16 characters in length.";
---
>           print "The password must be 3-16 characters in length, using only 
upper/lowercase alpha, digits, or underscore (_).";

Comment 1

15 years ago
The patch in bug 94618 was incomplete, as far as I can read, and this problem 
still exists on 2.16. It is not relevant to 2.17. The relevant line is:

while( $pass1 eq "" || $pass1 !~ /^[a-zA-Z0-9-_]{3,16}$/ ) {

I put a bonsai link in the URL. The solution suggested wouldn't work because 
the elseif reaching that line is only: 

} elsif ( $pass1 !~ /^.{3,16}$/ ) {

Either the character checks need to be removed from the while loop, or another 
elseif needs to be added to handle the !~ /^[a-zA-Z0-9-_]+$/ case.

justdave? bug 94618 was your review.

Note: I haven't tested this in a 2.16 installation, so I may be barking up the 
wrong tree. It just looks incorrect.
Severity: normal → minor
Whiteboard: 2.16
Target Milestone: --- → Bugzilla 2.16
Version: unspecified → 2.16.4

Comment 2

15 years ago
Vladd, if you have a minute, you may want to check this one out.
Whiteboard: 2.16 → [wanted for 2.16.5]
Anyone got a couple minutes to have a look at this?  We need to get 2.16.5
shipped...
(Assignee)

Comment 4

15 years ago
Created attachment 142123 [details] [diff] [review]
Version 1
Assignee: zach → vlad
Status: NEW → ASSIGNED
(Assignee)

Comment 5

15 years ago
Comment on attachment 142123 [details] [diff] [review]
Version 1

Tested, it works. Wanted for 2.16.5.
Attachment #142123 - Flags: review?(jouni)

Comment 6

15 years ago
Comment on attachment 142123 [details] [diff] [review]
Version 1

>+          print "\n\nThe password must be 3-16 characters in length, " .
>+                "and it must contain only upper/lowercase alpha, digits, " .
>+                "underscores (_), and hyphens (-).\n";

Throw in a \n somewhere, I'd suggest putting one after "must". Instead of
"upper/lowercase alpha", just say "letters" (this is technically incorrect
since the code only accepts A-Z, but let's not get into that here). Also, I'd
probably say "may" instead of "must". :-)

r=jouni with those changes.
Attachment #142123 - Flags: review?(jouni) → review+
(Assignee)

Comment 7

15 years ago
Created attachment 142130 [details] [diff] [review]
Version 2
Attachment #142123 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Flags: approval?
Flags: approval? → approval+
Whiteboard: [wanted for 2.16.5] → [wanted for 2.16.5] [does not affect trunk]
(Assignee)

Comment 8

14 years ago
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.149.2.22; previous revision: 1.149.2.21
done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Whiteboard: [wanted for 2.16.5] [does not affect trunk] → [fixed in 2.16.5] [does not affect trunk]
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.