Univention Bugzilla – Bug 33656
UDM syntax for group names does not allow german umlauts
Last modified: 2022-03-25 10:30:54 CET
The current UDM syntax for group names does not allow german umlaut characters. So it's currently impossible to use UDM cli to rename a group to a name with these chracters. It's possible via UMC since UMC-modules-udm does not use the syntax.py.
(In reply to Arvid Requate from comment #0) > It's possible via UMC since UMC-modules-udm does not use the syntax.py. What does UMC-modules-umc use?
(In reply to Stefan Gohmann from comment #1) > (In reply to Arvid Requate from comment #0) > > It's possible via UMC since UMC-modules-udm does not use the syntax.py. > > What does UMC-modules-umc use? Well, in both cases the syntax classes are evaluated! Either this could be an encoding problem or this might be an issue with the used local in combination with regular expressions, i.e., in en_US, umlauts are not considered to match \w.
To check if it is an encoding problem: if the syntax class gets a str object instead of unicode it will fail if the string is UTF-8 encoded: >>> auml_utf8 = u'ä'.encode('UTF-8') >>> regex = import re; re.compile( '(?u)^\w([\w -.]*\w)?$' ) # RE of gid syntax >>> regex.match(auml_utf8) is None True
*** Bug 18476 has been marked as a duplicate of this bug. ***
*** Bug 24746 has been marked as a duplicate of this bug. ***
*** Bug 11503 has been marked as a duplicate of this bug. ***
Currently (4.4.1.239) the regexp of class 'gid' is somewhat weird: 1334 regex = re.compile(ur"(?u)^\w([\w -.’]*\w)?$") The bracketed character class would match (left to right): * anything deemed a 'word character' in Unicode * the range of characters between 0x20 (space) and 0x2E (dot) * the Unicode char with codepoint U+2019 (right single quotation mark) I'd propose to change: * position the minus at the right end (so it can't be misunderstood as a range) * remove the spurious U+2019 char This would not solve this bug, but at least it would make the regexp really match what the description says.
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
*** This bug has been marked as a duplicate of bug 54589 ***
UCS 4.4: # udm groups/group create --set name='foobär' E: Invalid Syntax: Name: A group name must start and end with a letter, number or underscore. In between additionally spaces, dashes and dots are allowed. # udm groups/group create --set name='foobär' WARNING: The object is not going to be created underneath of its default containers. Object created: cn=foobär,l=school,l=dev → The Python 3 migration fixed it. See comment #3.