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

Re: [PATCH] use lock token in non-URI form in start_put

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Feb 8, 2009, 01:25 UTC
Message-ID
<be6fef0d0902071725i799b70efs9e36b45dc9c06246@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.0902072114360.10279@pacific.mpi-cbg.de>
Hi,

On Sun, Feb 8, 2009 at 4:20 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> If it is a prefix that happens to be part of the URI, but must not be used
> by the client code as a lock token, would it not be better to store the
> token in lock->token to begin with?

The URI form of the lock token is suitable for all other occurrences lock token usage; that is, only start_put needs the non-URI form, while the rest use the URI form.

That's why I only changed how start_put uses the lock token; changing lock token just for the sake of start_put doesn't seem very effective to me.

> This is unsafe.  What if lock->token does not contain a colon?  Even if it
> happens to be the case now, in your setup, it might change, or there might
> be mistakes in the server code.  We should always play it safe if we
> cannot control the other side's code.
Point noted. I'll try to think of something else.
-- 
Cheers,
Ray Chuan
Previous: Tay Ray Chuan
Message 7 of 7 in “use lock token in non-URI form in start_put”
  1. use lock token in non-URI form in start_putTay Ray Chuan, Feb 7, 2009
  2. Johannes SchindelinFeb 7, 2009
  3. Junio C HamanoFeb 7, 2009
  4. Tay Ray ChuanFeb 8, 2009
  5. Junio C HamanoFeb 8, 2009
  6. Tay Ray ChuanFeb 8, 2009
  7. Tay Ray ChuanFeb 8, 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.