bugGNU Core Utilities - Bugs: bug #19363, running any of the sum tools on a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #19363: running any of the sum tools on a filename with \ gives superfluous \ in output

Submitter:  Armijn Hemel <armijn>
Submitted:  Tue 20 Mar 2007 09:21:19 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 20 Mar 2007 11:43:30 PM UTC, comment #2: 

Closing.  The leading \ is indeed a feature, and has been documented in coreutils md5sum and sha*sum for years when \\ or \n appear in a filename (although I would like to see \r added to this list).  There is no more elegant solution for handling arbitrary file names, and it is a security hole if you can't handle arbitrary file names.

Eric Blake <ericb>
Group administrator
Tue 20 Mar 2007 10:42:55 PM UTC, comment #1: 

I just learned that the \ is there to indicate the filename should be escaped and that this is a "feature", so feel free to close it. It might be a good idea to look at a more permanent and or elegant solution though.

Armijn Hemel <armijn>
Tue 20 Mar 2007 09:21:19 PM UTC, original submission:  

[armijn@localhost tmp]$ touch bla
[armijn@localhost tmp]$ touch bla\\bla
[armijn@localhost tmp]$ sha256sum bla
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  bla
[armijn@localhost tmp]$ sha256sum bla\\bla
\e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  bla\\bla


If a file has a \ embedded in it, coreutils will output an extra \ at the beginning of the hash. I've seen this in various versions of coreutils, including 6.7.

Armijn Hemel <armijn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by armijn (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-03-20 ericb StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code