Edgewall Software
Modify

Opened 14 years ago

Closed 13 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 14 years ago by mgood

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:

$ python -c 'import sys; print sys.stdout.isatty()'
True
$ python -c 'import sys; print sys.stdout.isatty()' | cat
False

comment:2 follow-up: Changed 13 years ago by jeberger@…

See also tickets #151 and #243

comment:3 in reply to: ↑ 2 Changed 13 years ago by jeberger@…

Replying to jeberger@free.fr:

See also tickets #151 and #243

And #115.

comment:4 Changed 13 years ago by wbell

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [569]

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.