Bug 42466 - Wrong use of UCR might lead to crash
Wrong use of UCR might lead to crash
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-21 20:08 CEST by Florian Best
Modified: 2017-07-05 13:06 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.006
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-09-21 20:08:03 CEST
management/univention-management-console-module-udm/umc/python/udm/syntax.py:
131 »   »   »   subclasses = ucr.is_true(None, props.get('subclasses', 'false').lower(), False)

leads to this error:
  File "/usr/lib/pymodules/python2.7/univention/config_registry/backend.py", line 252, in is_true
    return value.lower() in ('yes', 'true', '1', 'enable', 'enabled', 'on')
AttributeError: 'bool' object has no attribute 'lower'

Switch the arguments and it is fixed.
Comment 1 Johannes Keiser univentionstaff 2017-07-03 17:00:52 CEST
(In reply to Florian Best from comment #0)
> management/univention-management-console-module-udm/umc/python/udm/syntax.py:
> 131 »   »   »   subclasses = ucr.is_true(None, props.get('subclasses',
> 'false').lower(), False)
> 
> leads to this error:
>   File "/usr/lib/pymodules/python2.7/univention/config_registry/backend.py",
> line 252, in is_true
>     return value.lower() in ('yes', 'true', '1', 'enable', 'enabled', 'on')
> AttributeError: 'bool' object has no attribute 'lower'
> 
> Switch the arguments and it is fixed.

Applied patch:

r 80794
univention-management-console-module-udm (7.0.10-15) 
* Bug #42466: Applied patch from Florian Best - Fix wrong use of
ucr.is_true()

YAML: r 80795
Comment 2 Florian Best univentionstaff 2017-07-03 17:18:14 CEST
OK: code is fixed
YAML: OK (adjusted in r80796)
Comment 3 Janek Walkenhorst univentionstaff 2017-07-05 13:06:31 CEST
<http://errata.software-univention.de/ucs/4.2/83.html>