Project

General

Profile

Actions

Bug #4100

closed

Validation of y/n answers in setlanip console menu

Added by Phillip Davis over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Console Menu
Target version:
Start date:
12/11/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.2
Affected Architecture:

Description

At the moment the user can answer "yes" to most of the (y/n) questions, but then later code only checks if the answer is "y". Thus you can type in "yes" in some places, have it accepted, but actually the negative action is taken. That is weird and will mess up people who try typing a whole string starting with "y".
You can also type in anything starting with "y" - "yzzzzz", "yrandomstuff" - and it will be accepted but the negative action is taken.
I suggest fix this up - only accept [uppercase|lowercase] "y" "yes" "n" "no". Re-prompt in response to any other user input. Take the action on [y|yes], do not do it on [n|no].

I am never quite sure when I have got to the last question. Sometimes it is nice to have a chance to bail-out at the last moment and then start over answering the questions correctly! So I am also suggesting asking "Do you want to apply these changes? (y/n)" as the last question.

Actions #3

Updated by Renato Botelho over 9 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Merged, thanks!

Actions #4

Updated by Phillip Davis over 9 years ago

And in the end the committed pull request was: https://github.com/pfsense/pfsense/pull/1385
I will do a change to add a confirming question at the end - maybe get to it tonight.

Actions #5

Updated by Renato Botelho over 9 years ago

  • Status changed from Feedback to Resolved

The question in the end is an enhancement, this ticket can be safely closed.

Actions

Also available in: Atom PDF