[Reportbug-maint] Bug#868022: reportbug: crashes when non-unicode characters are present in the report
IOhannes m zmoelnig
noc at iem.at
Tue Jul 11 09:48:28 UTC 2017
Package: reportbug
Version: 7.1.7
Severity: normal
Dear Maintainer,
while composing a bug-report, i wanted to type the paragraph symbol,
which was displayed with a trailing-space (using vi on a remote system),
which i consequently deleted (thus unknowingly turning the unicode character
into some garbage sequence).
after i finished the bugreport, i proceeded to send, at which point reportbug
crashed with a traceback:
~~~
Traceback (most recent call last):
File "/usr/bin/reportbug", line 2234, in <module>
main()
File "/usr/bin/reportbug", line 1107, in main
return iface.user_interface()
File "/usr/bin/reportbug", line 2150, in user_interface
package, severity, mode, charset=charset, tags=tags)
File "/usr/bin/reportbug", line 182, in handle_editing
editor, charset)
File "/usr/lib/python3/dist-packages/reportbug/ui/text_ui.py", line 1064, in spawn_editor
newmessage = open(filename).read()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 912: ordinal not in range(128)
~~~
while one can argue that there shouldn't be garbage sequences in the report,
reportbug should under no circumstances crash because of this.
i think the proper response would be to print an error message an re-open the
report so the user can fix it.
luckily I could find the report text in /tmp.
i'm attaching it.
gmasdr
IOhannes
PS: this seems to be somewhat similar to #814454 (although the encoding problem happened
at a different stage)
-- Package-specific info:
** Environment settings:
INTERFACE="text"
** /home/noc/.reportbugrc:
reportbug_version "2.18"
mode standard
ui text
realname "IOhannes m zmoelnig"
email "noc at iem.at"
-- System Information:
Debian Release: 9.0
APT prefers oldstable-updates
APT policy: (500, 'oldstable-updates'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages reportbug depends on:
ii apt 1.4.6
ii python3 3.5.3-1
ii python3-reportbug 7.1.7
reportbug recommends no packages.
Versions of packages reportbug suggests:
pn claws-mail <none>
pn debconf-utils <none>
pn debsums <none>
pn dlocate <none>
pn emacs24-bin-common | emacs25-bin-common <none>
ii exim4 4.89-2+deb9u1
ii exim4-daemon-light [mail-transport-agent] 4.89-2+deb9u1
ii file 1:5.30-1
pn gir1.2-gtk-3.0 <none>
pn gir1.2-vte-2.91 <none>
ii gnupg 2.1.18-6
pn python3-gi <none>
pn python3-gi-cairo <none>
pn python3-gtkspellcheck <none>
pn python3-urwid <none>
pn xdg-utils <none>
Versions of packages python3-reportbug depends on:
ii apt 1.4.6
ii file 1:5.30-1
ii python3 3.5.3-1
ii python3-debian 0.1.30
ii python3-debianbts 2.6.1
ii python3-requests 2.12.4-1
python3-reportbug suggests no packages.
-- no debconf information
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: reportbug-fusiondirectory-20170711-12861-mq7d_suw
URL: <http://lists.alioth.debian.org/pipermail/reportbug-maint/attachments/20170711/7d68c801/attachment.ksh>
More information about the Reportbug-maint
mailing list