Bug 25279 - Traceback when removing Konto Ablaufdatum
Traceback when removing Konto Ablaufdatum
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 3.1
Other Linux
: P4 normal (vote)
: UCS 4.0-0-errata
Assigned To: Florian Best
Arvid Requate
:
: 33395 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-07 14:50 CET by Andreas Büsching
Modified: 2016-05-03 09:03 CEST (History)
12 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional): Error handling, External feedback, Troubleshooting
Max CVSS v3 score:
hahn: Patch_Available+


Attachments
fail_shadow_expire (3.50 KB, text/plain)
2014-12-03 10:37 CET, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Büsching univentionstaff 2011-12-07 14:50:07 CET
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"}
Comment 1 Alexander Kläser univentionstaff 2012-12-04 13:08:43 CET
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 ...
Comment 2 Janis Meybohm univentionstaff 2013-03-15 10:13:16 CET
Erneut berichtet an Ticket#: 2013022221000427, auch mit UCS 3.1 reproduzierbar.
Comment 3 Moritz Muehlenhoff univentionstaff 2013-05-31 10:44:41 CEST
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.
Comment 4 Philipp Hahn univentionstaff 2013-08-04 10:48:47 CEST
/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")
Comment 5 Philipp Hahn univentionstaff 2013-09-06 18:22:06 CEST
*** Bug 32504 has been marked as a duplicate of this bug. ***
Comment 6 Tim Petersen univentionstaff 2013-09-09 09:03:32 CEST
Erneut an Ticket #2013090521001384 angefragt.
Comment 7 Philipp Hahn univentionstaff 2013-09-13 10:00:55 CEST
Patch: ffcd4f7 in attachment 5136 [details]
Comment 8 Stefan Gohmann univentionstaff 2013-11-14 20:25:51 CET
*** Bug 33395 has been marked as a duplicate of this bug. ***
Comment 9 Dirk Wiesenthal univentionstaff 2014-04-01 10:05:01 CEST
Reported by UMC Traceback
Comment 10 Florian Best univentionstaff 2014-05-27 12:00:11 CEST
Reported by UMC Traceback
Comment 11 Tim Petersen univentionstaff 2014-07-31 09:58:05 CEST
Reported at 2014073021000286
Comment 12 Florian Best univentionstaff 2014-10-06 10:53:04 CEST
Reported again.
Comment 13 Philipp Hahn univentionstaff 2014-11-17 13:36:37 CET
Again with 4.0 ...
Comment 14 Florian Best univentionstaff 2014-11-20 12:44:37 CET
reported again
Comment 15 Florian Best univentionstaff 2014-11-20 13:04:17 CET
(In reply to Florian Best from comment #14)
> reported again
twice, different UUID
Comment 16 Florian Best univentionstaff 2014-11-28 22:15:05 CET
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.
Comment 17 Florian Best univentionstaff 2014-12-03 10:37:52 CET
Created attachment 6494 [details]
fail_shadow_expire

hmm, where does it take the date 2014-01-01 from?
Comment 18 Florian Best univentionstaff 2014-12-03 15:52:31 CET
(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.
Comment 19 Arvid Requate univentionstaff 2015-01-12 18:01:39 CET
Test: 61_udm-users/26_password_expire_date
Test: 60_umc-system/33_umc_users_user_unset_userexpiry
Advisory: Ok.
Comment 20 Janek Walkenhorst univentionstaff 2015-01-22 11:55:56 CET
<http://errata.univention.de/ucs/4.0/43.html>
Comment 21 Florian Best univentionstaff 2015-10-14 12:14:52 CEST
Reported again, 3.2-7 errata372 (Borgfeld)
Comment 22 Florian Best univentionstaff 2015-12-08 10:51:09 CET
Reported again, 3.2-6 errata341 (Borgfeld)
Comment 23 Florian Best univentionstaff 2016-05-03 09:03:45 CEST
Reported again, 3.2-4 errata241 (Borgfeld)