Univention Bugzilla – Full Text Bug Listing |
Summary: | tracebacks when changing empty values in password policy | ||
---|---|---|---|
Product: | UCS | Reporter: | Wolf Wiegand <wiegand> |
Component: | UMC - Domain management (Generic) | Assignee: | Drees Dormann <dormann> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P4 | CC: | best, dormann, galkin, gohmann, hahn, klaeser, requate, walkenhorst, walter, wiesenthal |
Version: | UCS 3.2 | Flags: | klaeser:
Patch_Available+
|
Target Milestone: | UCS 4.0-0-errata | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://forge.univention.org/bugzilla/show_bug.cgi?id=33256 | ||
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: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | Error handling, External feedback | |
Max CVSS v3 score: | |||
Attachments: |
mapUNIX_TimeInterval_None.patch
Patch for conversion handling Newest version of patch |
Description
Wolf Wiegand
2007-06-06 09:34:11 CEST
Das Tritt unter 2.2-2 noch bzw. in leicht abgewandelter Form noch auf: Mit und ohne ignorePWHistory/PWLen gibt es bei der Passwortänderung am udm cli den folgenden Traceback: Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 231, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line 905, in doit dn=object.modify() File "/usr/lib/python2.4/site-packages/univention/admin/handlers/__init__.py", line 317, in modify return self._modify(modify_childs,ignore_license=ignore_license) File "/usr/lib/python2.4/site-packages/univention/admin/handlers/__init__.py", line 677, in _modify ml=self._ldap_modlist() File "/usr/lib/python2.4/site-packages/univention/admin/handlers/users/user.py", line 2302, in _ldap_modlist smbpwhlen = int(pwhistoryPolicy['length']) ValueError: invalid literal for int(): Das tritt in UCS 3.0 ebenfalls noch auf: =============================================================== 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 267, in _thread dn = module.create( properties, container = options.get( 'container' ), superordinate = options.get( 'superordinate' ) ) File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 130, in wrapper_func ret = func( *args, **kwargs ) File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 312, in create obj.create() File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 332, in create return self._create() File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 628, in _create al.extend(self._ldap_modlist()) File '/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py', line 2196, in _ldap_modlist smbpwhlen = int(pwhistoryPolicy['length']) ValueError: invalid literal for int() with base 10: '' =================================================================== *** Bug 29772 has been marked as a duplicate of this bug. *** Created attachment 5415 [details] mapUNIX_TimeInterval_None.patch Something like this needs to be done. I guess 0 is the proper equivalent to "None" in this context (see Bug #29918). *** Bug 33256 has been marked as a duplicate of this bug. *** Reported by user feedback. See Bug 33256 fot the traceback Reported again by traceback feedback The DNS Host record with empty TTL error reported again (Bug#33256) (In reply to Dirk Wiesenthal from comment #8) > The DNS Host record with empty TTL error reported again (Bug#33256) Again Ticket#2014111921000209 Reported with UCS 4.0: File "/usr/lib/pymodules/python2.7/univention/admin/mapping.py", line 100, in mapUNIX_TimeInterval value = int( value ) ValueError: invalid literal for int() with base 10: '' Created attachment 6581 [details]
Patch for conversion handling
This patch could possibly fix the issue since it intercepts an invalid value during list>string>integer conversion
Created attachment 6621 [details]
Newest version of patch
applied the patch Jenkins regression: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/121/SambaVersion=s3,Systemrolle=master/testReport/junit/10_ldap/63univention-admingrp-user-passwordreset/test/> len(pwhistoryPolicy['expiryInterval']) > 0: TypeError: object of type 'int' has no len() (In reply to Philipp Hahn from comment #14) > Jenkins regression: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/121/SambaVersion=s4,Systemrolle=master/testReport/junit/10_ldap/63univention-admingrp-user-passwordreset/test/> And a 2nd one: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/121/SambaVersion=s3,Systemrolle=master/testReport/junit/60_umc/06_non-ucr-policies/test/> <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/121/SambaVersion=s4,Systemrolle=backup/testReport/junit/60_umc/06_non-ucr-policies/test/> <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/121/SambaVersion=s4,Systemrolle=master/testReport/junit/60_umc/06_non-ucr-policies/test/> <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/121/SambaVersion=s3,Systemrolle=backup/testReport/junit/60_umc/06_non-ucr-policies/test/> The user object policy was reported as 'set([('length', 5), ('pwLength', 5)])', while should be 'set([('pwLength', '5'), ('length', '5')])' the new mapping returned an int instead of a string, this has been fixed (r57518) *** Bug 37603 has been marked as a duplicate of this bug. *** /usr/share/ucs-test/60_umc/06_non-ucr-policies passes again. /usr/share/ucs-test/10_ldap/63univention-admingrp-user-passwordreset passes again. With python-univention-directory-manager 10.0.29-20.1284.201501231232 this traceback is still present: File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 2142, in _ldap_modlist smbpwhlen = int(pwhistoryPolicy['length']) ValueError: invalid literal for int() with base 10: '' This need to be fixed at that specific point as you can't use '0' as default value. The code uses -1 for some values as default value. diff --git a/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py b/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py index e23967a..a0ce39b 100644 --- a/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py +++ b/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py @@ -2141 +2141 @@ def _ldap_modlist(self): - if smbpwhistoryPolicy != None and smbpwhistoryPolicy['length'] != None: + if smbpwhistoryPolicy is not None and smbpwhistoryPolicy['length'] != None and len(smbpwhistoryPolicy['length']) > 0: applied the proposed fix Fix: OK YAML: OK |