git/list[1] front-page[2] threads[3] people[4] search[5] about
 

gitweb commitdiff page - binary files with ampersands in filename?

From
OWOj W <ojwlists@gmail.com>
Date
Apr 9, 2013, 17:03 UTC
Message-ID
<CAKzCUUH4m8Hn_zcE_eHB9YBjDQWPAiX17HCOVZ80f+Tx5EVdOg@mail.gmail.com>

Change a binary file whose filename contains an ampersand, then view the commitdiff page in gitweb.

Git outputs a message like "Binary files a/b&w.dll and b/b&w.dll differ"

Gitweb format_diff_from_to_header() doesn't notice anything in that output which needs escaping, and writes it directly to the XHTML 1.0 Strict output.

Then gitweb's output is invalid XML, meaning that browsers such as Firefox will refuse to display the page.

(tested with v 1.7.9.5, but I can't see anything in latest https://github.com/git/git/blob/master/gitweb/gitweb.perl#CL2158 which is looking for text like "Binary files ... differ")

Next: Jakub Narębski
Message 1 of 2 in “gitweb commitdiff page - binary files with ampersands in filename?”
  1. Oj WApr 9, 2013
  2. Jakub NarębskiApr 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.