Opened 17 years ago
Closed 16 years ago
#232 closed defect (fixed)
Build system output is not sanitized in log
Reported by: | TimN | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.6 |
Component: | General | Version: | dev |
Keywords: | Cc: | ||
Operating System: | Linux |
Description
Bitten does not sanitize the logout output it sends after a successful step.
Our build system gives colored output on the console to make it easy to see at a glance what's going on. This prodocues strings like \033[1;30m in the output, where \033 is translated into the literal value 33 (not-printable character). This causes the xmlio.parse() call to fail and thus even though the build was successful it is not entered as such in the database. A 400 Bad Request (XML parser error) is returned instead.
The output should be sanitized to be XML compliant before it is sent. Even cooler would be if it understood the console color codes and translated them into HTML color codes such that the output looks the same on the build status page.
Attachments (0)
Change History (4)
comment:1 Changed 17 years ago by mgood
comment:2 follow-up: ↓ 3 Changed 17 years ago by jeberger@…
comment:3 in reply to: ↑ 2 Changed 17 years ago by jeberger@…
comment:4 Changed 16 years ago by wbell
- Resolution set to fixed
- Status changed from new to closed
Fixed in [569]
This could also be seen as a bug in the build tool for sending color codes when the output is not a TTY. Is this a custom or open source build tool that could be fixed to detect when the output was a pipe instead of a terminal and supress the color codes, or is it a third-party tool?
In Python it's easy to detect whether you're printing to a terminal or a pipe with sys.stdout.isatty() and there's probably a way to do it in whatever language the build tool is implemented in: