summaryrefslogtreecommitdiff
path: root/src/mailman/rest
diff options
context:
space:
mode:
authorBarry Warsaw2016-08-23 22:06:55 -0400
committerBarry Warsaw2016-08-23 22:06:55 -0400
commitdf929b21f9afc917cb515aca613fc925f6c9d1d0 (patch)
tree79240a6f6c097264f08eb7349089c05967683ecf /src/mailman/rest
parent3667b6dbc4110b12dd625e458dcdc8b3d9da7817 (diff)
downloadmailman-df929b21f9afc917cb515aca613fc925f6c9d1d0.tar.gz
mailman-df929b21f9afc917cb515aca613fc925f6c9d1d0.tar.zst
mailman-df929b21f9afc917cb515aca613fc925f6c9d1d0.zip
Close #273
A mailing list's ``description`` must not contain newlines. Given by Aurélien Bompard.
Diffstat (limited to 'src/mailman/rest')
-rw-r--r--src/mailman/rest/listconf.py3
-rw-r--r--src/mailman/rest/tests/test_listconf.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/rest/listconf.py b/src/mailman/rest/listconf.py
index c49228c39..ad8aefcbb 100644
--- a/src/mailman/rest/listconf.py
+++ b/src/mailman/rest/listconf.py
@@ -104,8 +104,7 @@ def password_bytes_validator(value):
def no_newlines_validator(value):
value = str(value)
if '\n' in value:
- raise ValueError(
- 'This value must be on a single line: {}'.format(value))
+ raise ValueError('This value must be a single line: {}'.format(value))
return value
diff --git a/src/mailman/rest/tests/test_listconf.py b/src/mailman/rest/tests/test_listconf.py
index 54918282f..b454337e4 100644
--- a/src/mailman/rest/tests/test_listconf.py
+++ b/src/mailman/rest/tests/test_listconf.py
@@ -439,7 +439,7 @@ class TestConfiguration(unittest.TestCase):
self.assertTrue(self._mlist.advertised)
def test_patch_bad_description_value(self):
- # GL issue #273
+ # Do not accept multiline descriptions. GL#273
with self.assertRaises(HTTPError) as cm:
call_api(
'http://localhost:9001/3.0/lists/ant.example.com/config'