Closed Bug 1284021 Opened 5 years ago Closed 4 years ago

checksetup.pl spins in an infinite loop when denied terminal input and no admin login is provided

Categories

(Bugzilla :: Installation & Upgrading, defect, P1)

5.1.1

Tracking

()

RESOLVED FIXED
Bugzilla 6.0

People

(Reporter: dylan, Assigned: spoony, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [good first bug])

Attachments

(1 file)

In the case where you provide a checksetup answers file, and that file doesn't provide, say, a login name or an email, checksetup will keep asking. There are several ways of solving this (a counter, for instance. Or checking if we can read from STDIN. Or if STDIN is a terminal)
Assignee: dylan → nobody
Mentor: dylan
Keywords: good-first-bug
Whiteboard: [good first bug]
The code in question is here: https://github.com/bugzilla/bugzilla/blob/master/Bugzilla/Install.pm#L334-L370
Checking for eof on STDIN would be helpful. Or having a max number of times the while loops can run.

Note that checking -t is probably bad as someone (like me) may run this from emacs shell mode
which is not a "real" terminal. Probably a combination of eof testing and a counter is the best bet.
Assignee: nobody → spoony
Comment on attachment 8767441 [details] [review]
[bugzilla] spoonyspork:master > bugzilla:master

It wouldn't be appropriate for me to review this patch.

(disclosure: spoonyspork is my wife)
Attachment #8767441 - Flags: review?(dkl)
Comment on attachment 8767441 [details] [review]
[bugzilla] spoonyspork:master > bugzilla:master

r=dkl
Attachment #8767441 - Flags: review?(dkl) → review+
To git@github.com:bugzilla/bugzilla
   5880669..8afe38b  master -> master
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 6.0
You need to log in before you can comment on or make changes to this bug.