diff options
author | Mark Sapiro <mark@msapiro.net> | 2018-03-08 17:33:07 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2018-03-08 17:33:07 -0800 |
commit | 21eafd3e46083eded01f67ea828bc7b46ffb3f07 (patch) | |
tree | fb8227f504f69e8423595805f21bf1c7b7b53261 /Mailman/Gui | |
parent | e61719889de7b570adb19af5e223c66f1e09e8bc (diff) | |
download | mailman2-21eafd3e46083eded01f67ea828bc7b46ffb3f07.tar.gz mailman2-21eafd3e46083eded01f67ea828bc7b46ffb3f07.tar.xz mailman2-21eafd3e46083eded01f67ea828bc7b46ffb3f07.zip |
Added a few more badword checks to Utils.suspiciousHTML().
Added validation of GUI updates to host_name.
Diffstat (limited to 'Mailman/Gui')
-rw-r--r-- | Mailman/Gui/General.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/Gui/General.py b/Mailman/Gui/General.py index 980e5f2b..dfde6309 100644 --- a/Mailman/Gui/General.py +++ b/Mailman/Gui/General.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2014 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2018 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -559,6 +559,14 @@ mlist.info. or not isinstance(val, IntType)): doc.addError(_("""<b>admin_member_chunksize</b> attribute not changed! It must be an integer > 0.""")) + elif property == 'host_name': + try: + Utils.ValidateEmail('user@' + val) + except Errors.EmailAddressError: + doc.addError(_("""<b>host_name</b> attribute not changed! + It must be a valid domain name.""")) + else: + GUIBase._setValue(self, mlist, property, val, doc) else: GUIBase._setValue(self, mlist, property, val, doc) |