Report generation crashes for non-ascii characters in commit messages.

Bug #1821165 reported by Robin Åstedt on 2019-03-21
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TextTest
Undecided
Geoff Bache

Bug Description

In texttestlib/default/batch/jenkinschanges.py method parsePlainChangeLog:

Here it parses changelog.xml (When it is in plain text format) by opening it in utf-8 encoding, but then when converting from a unicode string to a byte string it specifies ascii encoding.

Proposed fix:
- self.addUnique(bugs, self.getBugs(line.encode("ascii")))
+ self.addUnique(bugs, self.getBugs(line.encode("utf-8")))

This information is then used to generate an url so perhaps it would be good to strip the string of any non-url-safe characters. But, calling line.encode("ascii") for a file opened as utf-8 is definitely wrong.

Robin Åstedt (robin.astedt) wrote :
description: updated
Geoff Bache (geoff.bache) wrote :

Thanks for the report. Have committed your fix to trunk now, will try to release it when I have looked at another possibly related problem around encodings in this area... hopefully tomorrow.

Changed in texttest:
assignee: nobody → Geoff Bache (geoff.bache)
status: New → Fix Committed
Geoff Bache (geoff.bache) wrote :

Released TextTest 3.29.4 on PyPI now.

Changed in texttest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers