Univention Bugzilla – Bug 25279
Traceback when removing Konto Ablaufdatum
Last modified: 2016-05-03 09:03:45 CEST
Versucht man ein gesetztes Kontoablaufdatum zu entfernen wird eine Exception beim udm/validate geworfen: File '/usr/lib/pymodules/python2.6/notifier/threads.py', line 81, in _run tmp = self._function() File '/usr/lib/pymodules/python2.6/notifier/__init__.py', line 104, in __call__ return self._function( *tmp, **self._kwargs ) File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py', line 729, in _thread property_obj.syntax.parse( value ) File '/usr/lib/pymodules/python2.6/univention/admin/syntax.py', line 992, in parse if self._re_iso.match(text) != None: TypeError: expected string or buffer Das Frontend schickt folgende Werte zur Überprüfung: {"options":{"objectType":"users/user","properties":{"userexpiry":null,"$policies$":{"policies/pwhistory":"cn=30-days,cn=pwhistory,cn=users,cn=policies,dc=samba3,dc=test"}}},"flavor":"users/user"}
Ist erneut noch einmal aufgetreten: > File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run > tmp = self._function() > File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__ > return self._function( *tmp, **self._kwargs ) > File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 802, in _thread > property_obj.syntax.parse( value ) > File "/usr/lib/pymodules/python2.6/univention/admin/syntax.py", line 1039, in parse > if self._re_iso.match(text) != None: > > TypeError: expected string or buffer Als Workaround kann man über die Kommandozeile das Attribut auf einen leeren Wert setzen (--remove ergibt den gleichen Traceback): udm users/user modify --set userexpiry= --dn ...
Erneut berichtet an Ticket#: 2013022221000427, auch mit UCS 3.1 reproduzierbar.
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2. As such, this bug is moved to the new target milestone.
/usr/share/pyshared/univention/admin/syntax.py: class date(simple): ... _re_iso = re.compile(r'^([0-9]{4})-([0-9]{2})-([0-9]{2})$') _re_de = re.compile(r'^([0-9]{1,2})\.([0-9]{1,2})\.([0-9]+)$') @classmethod def parse(self, text): if text is None: return None match = self._re_iso.match(text) if match: year, month, day = map(lambda x: int(x), match.groups()) if 1960 < year < 2100 and 1 <= month <= 12 and 1 <= day <= 31: return '%02d.%02d.%02d' % (day, month, year % 100) match = self._re_de.match(text) if match: day, month, year = map(lambda x: int(x), match.groups()) if 0 <= year <= 99 and 1 <= month <= 12 and 1 <= day <= 31: return text raise univention.admin.uexceptions.valueError,_("Not a valid Date")
*** Bug 32504 has been marked as a duplicate of this bug. ***
Erneut an Ticket #2013090521001384 angefragt.
Patch: ffcd4f7 in attachment 5136 [details]
*** Bug 33395 has been marked as a duplicate of this bug. ***
Reported by UMC Traceback
Reported at 2014073021000286
Reported again.
Again with 4.0 ...
reported again
(In reply to Florian Best from comment #14) > reported again twice, different UUID
The date syntax has been fixed so that it accepts None. I did not touch UDM to also catch TypeError's as we don't find broken syntaxes like these anymore. The error message would be wrong then, too.
Created attachment 6494 [details] fail_shadow_expire hmm, where does it take the date 2014-01-01 from?
(In reply to Florian Best from comment #17) > Created attachment 6494 [details] > fail_shadow_expire > > hmm, where does it take the date 2014-01-01 from? wrong bug. still FIXED.
Test: 61_udm-users/26_password_expire_date Test: 60_umc-system/33_umc_users_user_unset_userexpiry Advisory: Ok.
<http://errata.univention.de/ucs/4.0/43.html>
Reported again, 3.2-7 errata372 (Borgfeld)
Reported again, 3.2-6 errata341 (Borgfeld)
Reported again, 3.2-4 errata241 (Borgfeld)