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

Submitted by:  Armijn Hemel <armijn>
Submitted on:  Tue 20 Mar 2007 09:21:19 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 Mar 2007 11:43:30 PM UTCericbStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1