Crypt remote does not allow all unicode characters

Based on Couple of questions regarding filename length and filename encoding thread it became apparent that crypt remote regardless of files' names encoding used does not allow all unicode characters.

Steps to reproduce:

Create crypt remote on top of physical remote supporting base32768 encoding, e.g.: onedrive, dropbox, iDrive, Box

[remote]
...

[remote-crypt]
type = crypt
remote = remote:test
filename_encoding = [base32,base64,base32768]
...
  1. Unzip locally base32768.zip file - it contains set of files with every single unicode character used by base32768
  2. Copy files to remote - rclone copy . remote: - works OK
  3. Copy files to crypt remote - rclone copy . remote-crypt: - always ERROR

I have tested it using iDrive and onedrive - both remotes support all base32768 characters.

But when using crypt things get weird as some error codes do not make sense...

Problematic character is in 0062-␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟.txt file - it is enough to copy only this file to get below results.

  1. iDrive - crypt with base64
2023/09/24 20:06:18 ERROR : 0062-␀‛␁‛␂‛␃‛␄‛␅‛␆‛␇‛␈‛␉‛␊‛␋‛␌‛␍‛␎‛␏‛␐‛␑‛␒‛␓‛␔‛␕‛␖‛␗‛␘‛␙‛␚‛␛‛␜‛␝‛␞‛␟.txt: Failed to copy: XMinioInvalidObjectName: Object name contains unsupported characters
  1. iDrive - crypt with base32768
3>ERROR : 0062-␀‛␁‛␂‛␃‛␄‛␅‛␆‛␇‛␈‛␉‛␊‛␋‛␌‛␍‛␎‛␏‛␐‛␑‛␒‛␓‛␔‛␕‛␖‛␗‛␘‛␙‛␚‛␛‛␜‛␝‛␞‛␟.txt: Failed to copy: SlowDown: Resource requested is unreadable, please reduce your request rate
  1. onedrive - crypt with base32
2023/09/24 19:50:56 ERROR : 0062-␀‛␁‛␂‛␃‛␄‛␅‛␆‛␇‛␈‛␉‛␊‛␋‛␌‛␍‛␎‛␏‛␐‛␑‛␒‛␓‛␔‛␕‛␖‛␗‛␘‛␙‛␚‛␛‛␜‛␝‛␞‛␟.txt: Failed to copy: invalidRequest: parameterIsTooLong: Parameter Exceeds Maximum Length
2023/09/24 19:50:56 ERROR : Attempt 1/3 failed with 1 errors and: invalidRequest: parameterIsTooLong: Parameter Exceeds Maximum Length

It is either a bug or crypt has limitations we do not documented.

What is happening is that the file is being interfered with by rclone encoding.

Because means something to rclone encoding it is escaping it to ‛␁. Because there are lots of these characters in a single file that means that the file name is getting a lot longer and I think that is where the problems are coming from.

What happens if you try a file with just a single one of these characters in (eg ) - does it work then?

as a file name works fine.

I did also few more tests changing this file length.

You are right that file name length is the issue when escaping is added.

Thank you.

No problems :slight_smile:

Note that I don't like that ‛␁ escaping - it doesn't really do the right thing so I may remove it and replace it with something better at some point!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.