Univention Bugzilla – Bug 41419
univention.config_registry.handler_set should validate arguments
Last modified: 2020-09-15 11:49:46 CEST
univention.config_registry.handler_set should raise TypeError if a string is passed as argument. It expects a list of strings. Otherwise it iterates through every char in the string and fails to set it because it doesn't contain a value. Nice example where it failed: http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20%28R2%29%20Multiserver/120/SambaVersion=s3/testReport/90_ucsschool/80_move_users_into_another_ou/test/
Created attachment 8142 [details] Patch This patch converts a string to a list. Any other types (number, etc) raise a TypeError.
(In reply to Julius Hinrichs from comment #1) > Created attachment 8142 [details] > Patch > > This patch converts a string to a list. Any other types (number, etc) raise > a TypeError. This doesn't work if a unicode-string is passed: please use "basestring" instead of "str". Please always add a argument when raising a exception. The patch now prevents using tuples and iterators/generators. I would remove the second check completely.
Created attachment 8144 [details] Updated patch
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 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.