Edgewall Software
Modify

Opened 16 years ago

Closed 15 years ago

#7643 closed defect (fixed)

Trac RSS feed invalid when svn log message has control characters

Reported by: foom@… Owned by: Remy Blank
Priority: normal Milestone: 0.11.3
Component: general Version: 0.11-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Somebody accidently committed a revision to my svn repository with an ESC control character (0x1b) in the log message. This ends up being echoed raw into the RSS XML feed, which causes an XML parser error in xml parsers trying to read it.

SVN itself has no issue with this char in the log message: svn protocol returns it as is, and in the HTTP protocol which uses XML it returns "?\027" (literally questionmark backslash 0 2 7).

It seems like trac should similarly escape the log message text in its output as well, to keep it well-formed.

I'm using version 0.11dev-r6396 which I realize is somewhat out-of-date, but I did try to look through the commits and bug reports to see if it had been fixed.

Attachments (0)

Change History (3)

comment:1 by Remy Blank, 16 years ago

Milestone: 0.11.3
Owner: set to Remy Blank

I'll put this on my to-do list. I wonder if this can happen elsewhere (wiki pages, attachments, file content, …).

comment:2 by Remy Blank, 16 years ago

Version: 0.11-stable

#7637 was closed as a duplicate.

comment:3 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in [7718] by removing all control characters not allowed in XML 1.0, that is, every character between 0x00 and 0x1f except 0x09, 0x0a and 0x0d, after rendering a template.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.