Univention Bugzilla – Bug 50476
TypeError in univention/admin/types.py
Last modified: 2019-11-13 16:04:42 CET
File "/usr/lib/pymodules/python2.7/univention/admin/types.py", line 413, in _from_json_type ud.debug(ud.INFO, 'Wrong date format: %r' % (value,)) TypeError: debug() takes at least 3 arguments (2 given) Caught by accident, because it crashes the UDM REST API server, when PATCH is used with a bad value (users/user → birthday="foo").
Also lines 437 and 464 are missing the "ud.ADMIN" argument.
Thanks, Fixed in: univention-directory-manager-modules (14.0.14-16) c70c6c37baaf | Bug #50476: fix type errors during logging univention-directory-manager-modules.yaml c70c6c37baaf | Bug #50476: fix type errors during logging
OK: code change OK: advisory OK: manual test: $ dpkg -l python-univention-directory-manager → 14.0.14-7 $ curl -i -k -X PATCH -H "Accept:application/json" -H "Content-Type:application/json" -u Administrator:univention -d '{ "properties": { "birthday": "foo" } }' 'https://m66.uni.dtr/univention/udm/users/user/uid=test01,cn=schueler,cn=users,ou=test01,dc=uni,dc=dtr' → HTTP-Error 500: TypeError: debug() takes at least 3 arguments (2 given) … ------------------------------------ $ univention-upgrade ------------------------------------ $ dpkg -l python-univention-directory-manager → 14.0.14-16 $ curl -i -k -X PATCH -H "Accept:application/json" -H "Content-Type:application/json" -u Administrator:univention -d '{ "properties": { "birthday": "foo" } }' 'https://m66.uni.dtr/univention/udm/users/user/uid=test01,cn=schueler,cn=users,ou=test01,dc=uni,dc=dtr' → HTTP-Error 422: Unprocessable Entity 1 error(s) occurred:\nRequest argument \"birthday\" The property birthday has an invalid value…
<http://errata.software-univention.de/ucs/4.4/348.html>