Univention Bugzilla – Bug 41084
UMC-Server: hanging connection when protocol parsing fails
Last modified: 2016-09-13 14:49:11 CEST
The connection between the UMC-Server and the UMC-Webserver hangs if the UMC-Moduleprocess sends a malformed UMCP message. We had the case that the message length information was calculated wrong due to returning a unicode object containing german umlauts which caused a parsing error of the next message because of some pending bytes (from the last message) in the buffer were parsed as new message. A hotfix is this: diff --git a/management/univention-management-console/src/univention/management/console/protocol/message.py b/management/univention-management-console/src/univention/management/console/protocol/message.py index 101ed38..e8b2a28 100644 --- a/management/univention-management-console/src/univention/management/console/protocol/message.py +++ b/management/univention-management-console/src/univention/management/console/protocol/message.py @@ -132 +132 @@ def _formattedMessage(_id, _type, mimetype, command, body, arguments): - data = body + data = bytes(body) @@ -210,0 +211 @@ def parse(self, msg): + PROTOCOL.error('Unparsable message header: %r' % (header,)) But we should fix a little bit more so that the error is communicated to the UMC-Webserver instead of a hanging connection.
*** Bug 38765 has been marked as a duplicate of this bug. ***
Fixed during Bug #42114 to enhance security. *** This bug has been marked as a duplicate of bug 42114 ***