Univention Bugzilla – Bug 27875
UMC-Server Absturz durch ungültige request daten
Last modified: 2012-08-15 13:36:36 CEST
# ps aufx | grep univention-management-console-server | grep -v grep root 18504 0.4 1.9 158352 19724 ? S 22:04 0:00 /usr/bin/python2.6 /usr/sbin/univention-management-console-server start # curl -d '{"options": {"":[""]}}' -i -H 'Content-Length: 22' -H 'Content-Type: application/json' -b 'UMCSessionId=cd091228-c1d1-4864-98c1-f73e7464e553' http://10.200.27.101/umcp/get/ucr ^C # ps aufx | grep univention-management-console-server | grep -v grep # Traceback (most recent call last): File "/usr/sbin/univention-management-console-server", line 209, in <module> umc_daemon.do_action() File "/usr/lib/pymodules/python2.6/daemon/runner.py", line 186, in do_action func(self) File "/usr/lib/pymodules/python2.6/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.6/notifier/nf_generic.py", line 284, in loop step() File "/usr/lib/pymodules/python2.6/notifier/nf_generic.py", line 271, in step not __sockets[ cond ][ fd ]( sock_obj ): File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 159, in _receive self._handle( state, msg ) File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 214, in _handle if value[ -1 ] == '*': IndexError: string index out of range
Index: univention-management-console/src/univention/management/console/protocol/server.py =================================================================== --- univention-management-console/src/univention/management/console/protocol/server.py (Revision 34095) +++ univention-management-console/src/univention/management/console/protocol/server.py (Arbeitskopie) @@ -211,7 +211,7 @@ response.status = SUCCESS if 'ucr' in msg.arguments: for value in msg.options: - if value[ -1 ] == '*': + if value.endswith('*'): value = value[ : -1 ] for var in filter( lambda x: x.startswith( value ), ucr.keys() ): response.result[ var ] = ucr.get( var )
univention-management-console (5.0.1-1) unstable; urgency=low * fixed typo; Bug #27875
(In reply to comment #2) > univention-management-console (5.0.1-1) unstable; urgency=low > * fixed typo; Bug #27875 Paket gebaut. für QA: zum Nachstellen: umc-get ucr -e -o '{"":""}'
Created attachment 4567 [details] neuer Patch Guter Ansatz, allerdings kann ein Aufruf von umc.tools.ucr(1) den Server immer noch zum Absturz zwingen. Siehe Patch anbei, diesen habe ich jetzt eingespielt (als Errata und in 3.1)
Der Patch wurde dem Errata hinzugefügt, die YAML-Datei (2012-07-24-univention-management-console.yaml) angepasst. QA: bitte Paketversion noch einmal überprüfen Die Änderungen wurden auch in 3.1 eingespielt: ==================== univention-management-console (5.0.4-1) unstable; urgency=low . * adapted error handling of UCR requests; Bug #27875 * added script refresh-i18n univention-management-console (5.0.5-1) unstable; urgency=low . * fixed missing translations; Bug #27875 ==================== Die Pakete wurden gebaut.
- Bug konnte reproduziert werde - Der Fix funktioniert - YAML ist in Ordnung - Änderungen nur unter 3.0-2 einspielbar - Fix in UCS 3.1 übernommen - Version vom Sourcepaket wurde erhöht - Eintrag im Changelog vorhanden
Das Errata-Update ist raus.
Verified!