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

Re: [PATCH] fast-export: fix anonymized tag using original length

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 31, 2021, 19:10 UTC
Message-ID
<xmqqlf4htoqa.fsf@gitster.g>
In-Reply-To
<pull.1030.git.1630425354496.gitgitgadget@gmail.com>
"Tal Kelrich via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 25 quoted lines
> From: Tal Kelrich <hasturkun@gmail.com>
>
> Commit 7f4075949686 (fast-export: tighten anonymize_mem() interface to
> handle only strings, 2020-06-23) changed the interface used in anonymizing
> strings, but failed to update the size of annotated tag messages to match
> the new anonymized string.
>
> As a result, exporting tags having messages longer than 13 characters
> would create output that couldn't be parsed by fast-import,
> as the data length indicated was larger than the data output.
>
> Reset the message size when anonymizing, and add a tag with a "long"
> message to the test.
>
> Signed-off-by: Tal Kelrich <hasturkun@gmail.com>
> ---
>     fast-export: fix anonymized tag using original length
>     
>     Fixes an issue with fast-export anonymization, where any original
>     annotated tag message longer than 13 characters would make the output
>     unimportable by fast-import (as the data length indicated the original
>     length).
>     
>     This also resolves a more minor issue, where if the original message was
>     short, the anonymized tag message would be truncated.

Thanks. I've looked at all places where anonymize_str() is used and found that this is the only problematic caller.

Will queue.
Previous: Tal Kelrich via GitGitGadgetNext: Jeff King
Message 2 of 3 in “fast-export: fix anonymized tag using original length”
  1. fast-export: fix anonymized tag using original lengthTal Kelrich via GitGitGadget, Aug 31, 2021
  2. Junio C HamanoAug 31, 2021
  3. Jeff KingAug 31, 2021

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.