Univention Bugzilla – Full Text Bug Listing |
Summary: | UMC-server crashes when extendedAttributes are not known | ||
---|---|---|---|
Product: | UCS | Reporter: | Dirk Wiesenthal <wiesenthal> |
Component: | UMC (Generic) | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Alexander Kläser <klaeser> |
Severity: | normal | ||
Priority: | P5 | CC: | best, gohmann, klaeser, walkenhorst |
Version: | UCS 4.0 | ||
Target Milestone: | UCS 4.0-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
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): | ||
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 38222 | ||
Attachments: | 37447.py |
Description
Dirk Wiesenthal
2015-01-05 15:41:10 CET
(In reply to Alexander Kläser from comment #1) > Is this problem being resolved with Bug 37347? No, the server still crashes. Along with this bug I fixed a lot of server crashes which could be done through malicious user input (e.g. null bytes in requests) or LDAP errors (because udm_errors.base is not catched): E.g.: umc-client -U Administrator -P univention -s 10.200.27.6 SET '' -e -o '{"locale": "\x00"}' umc-client -U Administrator -P univention -s 10.200.27.6 SET '' -e -o '{"user": {"preferences": "\x00"}}' I replaced the usage of the users/user handlers module by raw LDAP. Fix: svn r59293 YAML: 2015-03-13-univention-management-console.yaml EUIIM I tried my best to write a script which provokes this error also without the UMC server to fix the underlying UDM errors but could not. It is easy reproducible: just remove the extended attribute and set one favorite. Created attachment 6774 [details]
37447.py
24.03.15 10:05:37.008 MAIN ( ERROR ) : Traceback (most recent call last): File "/usr/sbin/univention-management-console-server", line 210, in <module> umc_daemon.do_action() File "/usr/lib/pymodules/python2.7/daemon/runner.py", line 186, in do_action func(self) File "/usr/sbin/univention-management-console-server", line 142, in _restart self._start() File "/usr/lib/pymodules/python2.7/daemon/runner.py", line 131, in _start self.app.run() File "/usr/sbin/univention-management-console-server", line 192, in run notifier.loop() File "/usr/lib/pymodules/python2.7/notifier/nf_generic.py", line 284, in loop step() File "/usr/lib/pymodules/python2.7/notifier/nf_generic.py", line 271, in step not __sockets[ cond ][ fd ]( sock_obj ): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 159, in _receive self._handle(state, msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 277, in _handle state.processor.request(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 282, in request self.handle_request_get(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 393, in handle_request_get favorites = self._get_user_favorites() File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 569, in _get_user_favorites favorites = self._get_user_preferences(self._get_user_connection()).setdefault('favorites', ucr.get('umc/web/favorites/default', '')).strip() File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 540, in _get_user_preferences return dict(val.split('=', 1) if '=' in val else (val, '') for val in preferences) TypeError: 'NoneType' object is not iterable (In reply to Florian Best from comment #5) > "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session. > py", line 540, in _get_user_preferences > return dict(val.split('=', 1) if '=' in val else (val, '') for val in > preferences) > TypeError: 'NoneType' object is not iterable This error happened if a user did not have the attribute univentionUMCProperty set. Fixed in svn r59334. (In reply to Dirk Wiesenthal from comment #0) > I found a traceback in the UMC server: > [...] > File > "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line > 127, in diff > if self.descriptions[key].multivalue: > KeyError: 'owncloudEnabled' OK, this works now, cool! I could reproduce the error in the following manner: (1) install owncloud (1st time) (2) uninstall owncloud (3) install owncloud → the session renewed automatically → UMC server crashes (4) goto (2) (In reply to Florian Best from comment #6) > (In reply to Florian Best from comment #5) > > "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session. > > py", line 540, in _get_user_preferences > > return dict(val.split('=', 1) if '=' in val else (val, '') for val in > > preferences) > > TypeError: 'NoneType' object is not iterable > > This error happened if a user did not have the attribute > univentionUMCProperty set. Fixed in svn r59334. OK, this works fine now, could not re-provoke this error with the new version. YAML entry: OK, I made minor adjustments and adapted the package version [r59339, r59340]. |