Sending bad content can completely stop Gajim from working
Versions
- OS: Windows 10
- GTK+ Version: 3.22.28
- PyGObject Version: 3.26.1
- python-nbxmpp Version: 0.6.4
- Gajim Version: 1.0.0
Traceback
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 658, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 4025: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/gajim/gui_interface.py", line 2386, in process_connections
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/idlequeue.py", line 518, in process
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 448, in pollin
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 668, in _do_receive
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw32/lib/python3.6/site-packages/nbxmpp/transports_nb.py", line 91, in decode_py2
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 4025: invalid continuation byte
Steps to reproduce the problem
I sent the following JSON string (decoded) through Prosody: "\ud83c\udde9\ud83c\uddea" (that's an emoji flag), Gajim upon receiving it throws this exception. Unfortunately now the broken message is in Logs.db so Gajim crashes upon each restart. Removing Logs.db allows Gajim to start and work until it tries to synchronize history with the server (MAM?), then it crashes. Now Logs.db again has the bad string.