rclone: Bug in the "Obfuscation" method of encrypting filenames ?

I think I may have found a bug in the “Obfuscation” method of encrypting filenames. I am using rclone v1.36-20-g2fd86c9β and Amazon Cloud Drive.

When I try to name a folder on a crypted remote to “Avatar The Last Airbender”, I get a garbled result.

Eg:

MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd acd-MyUserName-gmail-com-crypt:TV/ | grep asdf
          -1 2017-04-07 04:51:49        -1 asdf
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone moveto  "acd-MyUserName-gmail-com-crypt:TV/asdf" "acd-MyUserName-gmail-com-crypt:TV/Avatar The Last Airbender"
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd acd-MyUserName-gmail-com-crypt:TV/ | grep Ava
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd acd-MyUserName-gmail-com-crypt:TV/ | grep Bwb
          -1 2017-04-07 04:53:21        -1 Bwbubs Uif Mbtu Bjscfoefs
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$

(Note: I know which garbled filename to look for in the example above after trying to figure out what was happening - I don’t know if it is predictable, but it is consistent.)

Interestingly, it can still be referred to by the name it “should” be:

MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone size "acd-MyUserName-gmail-com-crypt:TV/Avatar The Last Airbender"
Total objects: 59
Total size: 10.236 GBytes (10991065480 Bytes)
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$

And changing just a single letter makes it act “normally” (‘T’ to ‘t’ in ‘The’):

MyUserName@MyServer:~/bin/rclone moveto "acd-MyUserName-gmail-com-crypt:TV/Avatar The Last Airbender" "acd-MyUserName-gmail-com-crypt:TV/Avatar the Last Airbender"
MyUserName@MyServer:~/bin/rclone lsd acd-MyUserName-gmail-com-crypt:TV | grep Ava
          -1 2017-04-07 04:58:24        -1 Avatar the Last Airbender
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$

Behind the scenes it looks like this (when “broken”):

MyUserName@MyServer:~/bin/rclone lsd --crypt-show-mapping acd-MyUserName-gmail-com-crypt:TV
[...]
2017/04/07 07:01:33 NOTICE: Bwbubs Uif Mbtu Bjscfoefs: Encrypts to "0.Bwbubs Uif Mbtu Bjscfoefs"

MyUserName@MyServer:~$ ~/bin/rclone lsd --crypt-show-mapping acd-MyUserName-gmail-com:crypt/170.oq | grep Bwb
          -1 2017-04-07 05:01:28        -1 0.Bwbubs Uif Mbtu Bjscfoefs
MyUserName@MyServer:~$

I also seem to be seeing the same bug with the folder name “Fullmetal Alchemist Brotherhood”:

MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd  acd-MyUserName-gmail-com-crypt:TV  
[...]
          -1 2017-04-07 05:13:22        -1 F
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone moveto  "acd-MyUserName-gmail-com-crypt:TV/F" "acd-MyUserName-gmail-com-crypt:TV/Fullmetal Alchemist Brotherhood"
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd  acd-MyUserName-gmail-com-crypt:TV  | grep Full
          -1 2017-04-06 07:06:01        -1 Fullmetal Alchemist
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd  acd-MyUserName-gmail-com-crypt:TV
[...]

          -1 2017-04-07 05:37:17        -1 Gvmmnfubm Bmdifnjtu Cspuifsippe
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd --crypt-show-mapping acd-MyUserName-gmail-com-crypt:TV
2017/04/07 07:38:52 NOTICE: Gvmmnfubm Bmdifnjtu Cspuifsippe: Encrypts to "0.Gvmmnfubm Bmdifnjtu Cspuifsippe"
          -1 2017-04-07 05:37:17        -1 Gvmmnfubm Bmdifnjtu Cspuifsippe
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd --crypt-show-mapping acd-MyUserName-gmail-com:crypt/170.oq | grep Gvm
          -1 2017-04-07 05:37:17        -1 0.Gvmmnfubm Bmdifnjtu Cspuifsippe
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone moveto  "acd-MyUserName-gmail-com-crypt:TV/Fullmetal Alchemist Brotherhood" "acd-MyUserName-gmail-com-crypt:TV/Fullmetal Alchemist brotherhood"
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$ ~/bin/rclone lsd  acd-MyUserName-gmail-com-crypt:TV  | grep Full
          -1 2017-04-07 05:40:21        -1 Fullmetal Alchemist brotherhood
MyUserName@MyServer:~/files/acd-MyUserName@gmail.com/local/TV$

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, sorry. I talked just with the information on the message, i had have to check all the source. It cannot be so easy 😦

Sorry mate.