Opened 16 years ago
Closed 16 years ago
#7643 closed defect (fixed)
Trac RSS feed invalid when svn log message has control characters
Reported by: | 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 , 16 years ago
Milestone: | → 0.11.3 |
---|---|
Owner: | set to |
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
I'll put this on my to-do list. I wonder if this can happen elsewhere (wiki pages, attachments, file content, …).