Univention Bugzilla – Bug 38659
undefined name 'm' in M2Crypto/ASN1.py
Last modified: 2019-01-03 07:17:32 CET
There is a typo in M2Crypto/ASN1.py which causes the reported traceback. Traceback occurs when opening a user object in UMC which has a user certificate with an invalid month string. (not in ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug","Sep", "Oct", "Nov", "Dec"]) A fix would be easy: s/m/month/. I am not completely sure if there are followup errors: why is there a invalid user certificate in LDAP? We should also either validate it or sanitize the values. Die Ausführung des Kommandos udm/get users/user ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 207, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 475, in _thread obj = module.get(ldap_dn) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func return _func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func ret = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 620, in get obj.open() File "%PY2.7%/univention/admin/handlers/users/user.py", line 1529, in open self.reload_certificate() File "%PY2.7%/univention/admin/handlers/users/user.py", line 1572, in reload_certificate values = load_certificate(certificate) File "%PY2.7%/univention/admin/handlers/users/user.py", line 1154, in load_certificate 'certificateDateNotAfter': x509.get_not_after().get_datetime().date().isoformat(), File "/usr/lib/python2.7/dist-packages/M2Crypto/ASN1.py", line 177, in get_datetime raise ValueError("Invalid date %s: Invalid month: %s" % (date, m)) NameError: global name 'm' is not defined Remark: Benutzerzertifikat vom Win 7 Client bei PKI Einstellungen hinterlegt Version: 4.0-2 errata205 (Walle)
1) Schritte, um den Fehler zu reproduzieren Nachdem ich zu Testzwecken ein Userzertifikat (***_ucs.cer) beim User *** importiert hatte, ließ sich der User anschließend in der UCS-Konsolenverwaltung nicht mehr aufrufen. Alle anderen Benutzer haben keine Zertifikate. Dort ist alles ok - Benutzerverwaltung des jeweiligen Users lässt sich aufrufen. Beim Benutzer andre.wolsing mit Zertifikat kommt die Fehlermeldung nun jedesmal wenn ich den User in der UCS-Verwaltung aufrufen will. 2) erwartetes Ergebnis Benutzerprofil des Users kann aufgerufen werden. 3) beobachtetes Ergebnis Benutzerprofil des Users kann nicht aufgerufen werden.
Fixed in upstream version 0.22.4.
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016. Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.