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

Re: bug: git-http-push fails to validate email address in LOCK request

From
Mike Hommey <mh@glandium.org>
Date
Apr 9, 2009, 12:02 UTC
Message-ID
<20090409120205.GA29046@glandium.org>
In-Reply-To
<20090409111944.GA22297@kos.to>
On Thu, Apr 09, 2009 at 02:19:44PM +0300, Riku Voipio <riku.voipio@iki.fi> wrote:
Show 9 quoted lines
> from http-push.c, we see that the lock request is:
> 
> #define LOCK_REQUEST "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<D:lockinfo xmlns:D=\"DAV:\">\n<D:lockscope><D:exclusive/></D:lockscope>\n<D:locktype><D:write/></D:locktype>\n<D:owner>\n<D:href>mailto:%s</D:href>\n</D:owner>\n</D:lockinfo>"
> 
> So there is exactly one variable being set. Turns out the email
> address in .gitconfig was set to '<riku.voipio@iki.fi>'. Yes,
> a user error. This was copied from $EMAIL env variable, where
> using strings such as 'foo bar <foo.bar@corp.com>' have been
> a norm forever.

That's the problem with generating XML by concatenating strings without checks :(

Mike
Previous: Riku VoipioNext: Mike Hommey
Message 2 of 4 in “bug: git-http-push fails to validate email address in LOCK request”
  1. Riku VoipioApr 9, 2009
  2. Mike HommeyApr 9, 2009
  3. Replace ",<,>,& with their respective XML entities in DAV requestsMike Hommey, Apr 9, 2009
  4. Replace ",<,>,& with their respective XML entities in DAV requestsMike Hommey, Apr 9, 2009

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.