GNU bug report logs - #66519
b2sum, md5sum sha*sum etc broken on filenames including backslash

Previous Next

Package: coreutils;

Reported by: "Simon Richter M. Sc." <simon.richter <at> uni-paderborn.de>

Date: Fri, 13 Oct 2023 13:24:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #18 received at 66519 <at> debbugs.gnu.org (full text, mbox):

From: "Glenn Golden" <gdg <at> zplane.com>
To: "Simon Richter M. Sc." <simon.richter <at> uni-paderborn.de>
Cc: 66519 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigBrady.com>
Subject: Re: bug#66519: b2sum, md5sum sha*sum etc broken on filenames including
 backslash
Date: Tue, 17 Oct 2023 07:25:49 -0600

On Tue, Oct 17, 2023, at 02:22, Simon Richter M. Sc. wrote:
>
> No that doesn't make sense, this can't be intended behaviour, even if 
> you escape the backslash there should be no backslash in the beginning 
> of the checksum!
>

It is intended and documented as such. From coreutils.info (9.3):

   "Without ‘--zero’, if FILE contains a backslash, newline, or carriage
    return, the line is started with a backslash, and each problematic
    character in the file name is escaped with a backslash, making the
    output unambiguous even in the presence of arbitrary file names."

You can argue that it ought to have been done differently, but it is the 
documented behavior.

Glenn Golden





This bug report was last modified 1 year and 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.