Bug 52662 - Wrong mapping of "en:Country"/"de:Land" to "ldap:stateOrProvinceName" attribute - should be "ldap:countryName"
Wrong mapping of "en:Country"/"de:Land" to "ldap:stateOrProvinceName" attribu...
Status: RESOLVED DUPLICATE of bug 50073
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
https://www.rfc-editor.org/rfc/rfc225...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-15 14:11 CET by Philipp Hahn
Modified: 2021-01-15 15:30 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2021-01-15 14:11:09 CET
On https://nissedal.knut.univention.de/univention/self-service/#page=profiledata you can select your "Land", e.g. "Deutschland".

This is stored in LDAP as "st: DE", which is wrong as "ST" is short for "stateOrProvinceName", e.g. "Bundesland Bremen":
> # ldapsearch -xLLLo ldif-wrap=no -b cn=Subschema -s base   attributeTypes -E mv='(attributeTypes=st)'
> dn: cn=Subschema
> attributeTypes: ( 2.5.4.8 NAME ( 'st' 'stateOrProvinceName' ) DESC 'RFC2256: state or province which this object resides in' SUP name )

The correct attribute would be "C", which is short for "countryName":
> # ldapsearch -xLLLo ldif-wrap=no -b cn=Subschema -s base   attributeTypes -E mv='(attributeTypes=c)'
> dn: cn=Subschema
> attributeTypes: ( 2.5.4.6 NAME ( 'c' 'countryName' ) DESC 'RFC4519: two-letter ISO-3166 country code' SUP name SYNTAX 1.3.6.1.4.1.1466.115.121.1.11 SINGLE-VALUE

This is not a bug in Self-Service, but in UDM users/user:

> # udm users/user list --filter uid=phahn | grep -e country -e ^DN
> DN: uid=phahn,cn=self registered users,dc=phahn,dc=dev
>   country: DE

> # univention-ldapsearch -LLLo ldif-wrap=no uid=phahn st c
> dn: uid=phahn,cn=self registered users,dc=phahn,dc=dev
> st: DE

In UMC/UDM "Konto" → "Geschäftlich" → "Land"

management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py:1187
> mapping.register('country', 'st', None, univention.admin.mapping.ListToString)
Comment 1 Florian Best univentionstaff 2021-01-15 15:30:04 CET

*** This bug has been marked as a duplicate of bug 50073 ***