Skip to content

Conversation

@stavros-k
Copy link
Contributor

@stavros-k stavros-k commented Jan 2, 2026

After figuring out why the UI wouldnt show the decrypted dir names (truenas/webui#13058)
I saw that one of my buckets wouldn't show the decrypted names for the root dir, but would for subdirs.

It looks like the cryptdecode has a hard limit of 10 items per call (https://github.com/rclone/rclone/blob/28c187b9b49a9785a7f47a802c74e8a8aedf11c6/cmd/cryptdecode/cryptdecode.go#L48). So in this PR i'm batching the file names to cryptdecode.

Backport to 25.10.2 would be nice.

@stavros-k stavros-k requested review from a team and Copilot January 2, 2026 13:26
@bugclerk bugclerk changed the title batch cryptdecode NAS-139149 / 26.04 / batch cryptdecode Jan 2, 2026
@bugclerk
Copy link
Contributor

bugclerk commented Jan 2, 2026

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where directories with more than 10 encrypted files would not have their names decrypted in the UI. The issue was caused by rclone's cryptdecode command having a hard limit of 10 items per call. The fix batches the encrypted filenames into groups of 10 and processes them sequentially.

Key Changes

  • Introduced batching logic to process encrypted filenames in groups of 10
  • Added clear comments explaining the rclone cryptdecode limit
  • Maintained existing error handling and result accumulation logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stavros-k stavros-k force-pushed the cloud-sync-encrypted-names branch from 1e4ffb7 to 9496a60 Compare January 2, 2026 13:56
@stavros-k stavros-k requested a review from yocalebo January 2, 2026 13:59
Copy link
Contributor

@yocalebo yocalebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Though.... I hate we're fork+exec'ing here ☹️ . It also seems a bit like pseudo-security to encrypt file names..... paranoia abounds

@stavros-k
Copy link
Contributor Author

Note: *Due to itertools.batched, this cant backported to 25.10.2

@stavros-k stavros-k merged commit 55b7a16 into master Jan 2, 2026
2 checks passed
@bugclerk
Copy link
Contributor

bugclerk commented Jan 2, 2026

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jan 2, 2026
@stavros-k stavros-k deleted the cloud-sync-encrypted-names branch January 2, 2026 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants