Univention Bugzilla – Bug 46599
mail syntax allows space in email address
Last modified: 2020-03-18 12:27:38 CET
The UDM syntax check for mailPrimaryAddress and mailAlternativeAdress (and probably also "email") does allow space in an email address. That is valid in the local part, but it must then be quoted, which is not done. But I suggest to not allow space at all, because it is a sure way to trouble, once communication with other mail servers begins.
Added test "71_spaces_in_mail_address" to check if udm-test does not allow spaces in email addresses. Changes to "syntax.py" so that udm-test does not allow spaces in email addresses anymore. Solution was pushed to branch troehmey/bug46599 with commit fbc6e8f1fb10acb306387d98073934cc54c5f530 "Bug #46599: added test module and fixed udm test to not allow spaces" Waiting for check by QA
Please apply the style fixes I did for Bug #50748. The test does _not_ fail, when an email address with a space is accepted. It only fails if there was an error, but it was not the expected one.
Corrected test and added style fixes with commit commit 895afdca451f10665d963ec8f70536355607bc01 Bug #46599: correction and style fixes on branch troehmey/bug46599
OK: test works I simplified the test logic a bit. The utils.fail() can simply follow the udm.create_user() before the except-block, as that should never happen. A second utils.fail() exists in the except-block for the case, that the user creation failed for an unexpected reason. BTW: the test can run on UCS systens without installed mail server app, so I changed the required "packages" to "univention-mail-postfix". I modified syntax.py only to replace the \ with (), because I think it improves readability. [troehmey/bug46599 f0170a1923] Bug #46599: use brackets instead of backslash [troehmey/bug46599 0f444b5efc] Bug #46599: simplify test logic Please merge the branch into the "4.4-3" branch, create changelog entries, build both packages and create an advisory.
Feature branch troehmey/bug46599 is now merged into 4.4-3. Changelog entries were made and both packages built. The yaml for univention-directory-manager-modules was created.
You rebuilt 14.0.14-22, but your version is 14.0.14-23. I built it and updated the yaml file. Same for ucs-test: you built 9.0.3-175, but it should be 9.0.3-176. [4.4-3 f9d82d3bf5] Bug #46599: update advisory univention-directory-manager-modules (14.0.14-23) ucs-test (9.0.3-176)
OK: code change OK: manual test OK: automatic test OK: advisory
<http://errata.software-univention.de/ucs/4.4/486.html>