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

RESOLVED FIXED in Bugzilla 6.0

Status

()

defect
P1
minor
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dylan, Assigned: spoony, Mentored)

Tracking

({good-first-bug})

5.1.1
Bugzilla 6.0

Details

(Whiteboard: [good first bug])

Attachments

(1 attachment)

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)
Reporter

Updated

3 years ago
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.
Reporter

Updated

3 years ago
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: 3 years ago
Resolution: --- → FIXED
Reporter

Updated

3 years ago
Target Milestone: --- → Bugzilla 6.0
You need to log in before you can comment on or make changes to this bug.