[PATCH 0/6] input validation for dialogs

David Shea dshea at redhat.com
Mon Mar 31 20:05:29 UTC 2014


These patches add a new InputCheckHandler subclass to set error tooltips on
dialog entries in the same way that we currently display the error messages for
LUKS passphrase input. The dialogs for NTP configuration, HTTP proxy and
advanced user settings have been modified to use this subclass.

Aaaaaaand then there's that first patch that combines the nastiness of URL
validation with the Python's unfortunate re syntax. PROXY_URL_PARSE rejected a
lot of actually-valid URLs and lacked IPv6 support, so this change corrects
those deficiencies and expands the parsing to the query and fragment portions
of URLs, which may be useful in the future for handling the URLs elsewhere in
the source spoke.

David Shea (6):
  Generalized and improved the proxy URL parsing regex
  Add an InputCheckHandler subclass for dialogs.
  Add a new InputCheck status for silent failures.
  Use GUIDialogInputCheckHandler in the advanced user dialog
  Provide feedback for invalid NTP hostnames.
  Validate proxy URLs

 pyanaconda/iutil.py                          |  48 +++----
 pyanaconda/network.py                        |  18 +--
 pyanaconda/regexes.py                        |  59 ++++++++-
 pyanaconda/ui/gui/spokes/advanced_user.glade |  12 --
 pyanaconda/ui/gui/spokes/datetime_spoke.py   |  45 +++++--
 pyanaconda/ui/gui/spokes/source.py           |  55 +++++---
 pyanaconda/ui/gui/spokes/user.py             |  21 +--
 pyanaconda/ui/helpers.py                     |  39 +++++-
 tests/regex_tests/hostname_test.py           | 190 +++++++++++++++++++++++++++
 tests/regex_tests/proxy_test.py              | 119 -----------------
 tests/regex_tests/url_test.py                | 183 ++++++++++++++++++++++++++
 11 files changed, 580 insertions(+), 209 deletions(-)
 create mode 100644 tests/regex_tests/hostname_test.py
 delete mode 100644 tests/regex_tests/proxy_test.py
 create mode 100644 tests/regex_tests/url_test.py

-- 
1.9.0



More information about the anaconda-patches mailing list