Names, node passphrases, hash keys and extended attributes are encrypted to public keys, so the server, or anyone, can write them as a small compressed message which expands to gigabytes when decrypted. They were decompressed into memory without a limit. Names, passphrases and hash keys are now limited to 64 KiB and extended attributes to 16 MiB, enough for the block sizes of an 8 TiB file. Extended attributes with a negative Size are now read as having no size, as the reference SDK reads other invalid sizes, so a file is never listed with a negative size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7.5 KiB
TODO
Fork-only durable backlog for things noticed and deliberately not fixed.
Small, specific, independently actionable. Remove only when actually done.
(In Go source, upstream's FIXME/TODO comment convention still applies.)
Now
Next
-
protondrive: a full read lists every block page before releasing the first byte, one request per 20 blocks in sequence, so a very large file waits (about 12 requests for 1 GiB, about 1280 for 100 GiB) before data flows. Fetching pages in parallel under the 15-request metadata limit would cut that.
-
protondrive: a ranged read (offset > 0 or a limit, as multi-thread copies and mounts make) checks each block against the hash the server lists for it, its decryption and its recorded size, but not the manifest, so a server can serve validly encrypted blocks of the same file swapped or from an older revision of the same size. The planned fix is a bounded per-revision cache of manifest-verified block hashes.
-
protondrive: a server can serve an earlier revision whole (blocks, manifest and extended attributes, all validly signed) under the current revision ID undetected, as nothing signed binds them to the revision; the SDK can't detect it either. Raise with Proton.
-
protondrive:
--dump headerslogs Proton'spm-storage-tokenandx-pm-uid(fshttp redacts onlyAuthorization), and--dump bodieslogs the access, refresh and upload tokens in JSON bodies (seen inTestNoSecretsInLogs). Task 20's docs must carry the spec 7 warning; a header redaction list infshttpwould be an upstream change. -
protondrive: a name whose signature fails is listed and the file read with only an
ERRORlogged (spec 6.2, the SDK's behaviour), and names aren't bound to their node, so a server can swap the encrypted names of two files in one folder undetected. Raise with Proton. -
protondrive: a hostile 10 MiB name is decrypted in full before
validateNamerejects it (about 230 MiB allocated listing it, the fake included). Consider refusing an encrypted name over a few KiB before decrypting it. -
lib/pacer:
TokenDispenser.Gettakes no context, so a cancelled protondrive block download still waits for a download token (held by other in-flight blocks, which finish or fail soon) before it notices. Consider a context-awareGet. -
protondrive: confirm on a real account that the official web, desktop and mobile clients read a file written by Task 5's
crypto.go(v4 node key advertising SEIPDv2, v6 PKESK content key, SEIPDv2 GCM blocks, block signatures encrypted with the content session key). This is what the SDK (js/v0.23.0) writes, but go-proton-api v1.0.4link_file_types.go(SetContentKeyPacketAndSignature) and Proton-API-Bridge v1.0.5crypto.go(generateLockedKey) say the official clients do not reliably read crypto-refresh files and that the server rejects a v6 content key packet for a v4 node key; the bridge never sent one with a key advertising SEIPDv2, so its claim may not apply. Released rclone itself is not the problem: Task 6'sTestNewWriterOldReadershows go-proton-api v1.0.4 and the bridge's block reader read this format (v6 PKESK, SEIPDv2 blocks and block signatures) and the newtoISOStringmodification time. -
protondrive: when go-proton-api and Proton-API-Bridge leave
go.mod(Task 14), delete the old-library parts ofbackend/protondrive/crypto_diff_internal_test.goand the-updatebranch ofTestFrozenFixtures, keeping the fixtures and their check;github.com/relvacode/iso8601, made a direct requirement for that test, goes back to indirect or away.TestFrozenFileFixture(download_internal_test.go, fixtures intestdata/oldlib/file/) stays as it is; its regeneration lives inTestOldLibraryFileReadable, which goes with the differential file. Only the frozen file fixtures are a single block: multi-block files from the old library are covered byTestOldLibraryFileReadablealone, so they lose coverage then. -
protondrive:
client.apiCallretries POST and PUT mutations (create folder, move, rename, copy) after 5xx and network errors, as the SDK does. If a lost response hid a success, the retry fails witherrExists(2500) or a staleOriginalHash(2000) although the change was made. Consider re-reading the node after such a retry failure. -
protondrive:
createRevision(POST.../files/{id}/revisions) is retried byapiCallafter a lost response like any POST; a retry that succeeds leaves the first draft revision orphaned on the server (the fake allows several draft revisions). Find out whether Proton refuses a second draft revision, and delete or reuse our own if so. -
protondrive: confirm on a real account what
delete_multipledoes to an active (non-draft) link. The upload cleanup only sends it for drafts, and the fake refuses non-drafts, but the SDK's conflict handler sends it for anyConflictDraftRevisionID, which an active file with a draft revision also reports; Task 11 uploads a new revision in that case instead. -
protondrive: confirm the HTTP status and code Proton returns for a bad verifier token, a missing block and a stale
CurrentRevisionID(the fake uses 422 / 2000, which the spec maps to "upgrade rclone"). -
protondrive: several
Fsof one account in one process each have their own node cache; only Move/DirMove sources are invalidated across them. Events (spec 6.2) fix this. -
protondrive:
go mod tidywould dropgithub.com/rclone/Proton-API-Bridgefromgo.modnow (no Go file imports it; the differential tests import onlygo-proton-api). Left in place for Task 19, which removes both. -
protondrive: browser sign-in in
rclone configwaits up to 10 minutes polling; a non-interactiveconfig createwithout username and password waits the same. -
Propose a CI check for this fork:
AGENTS.md,CLAUDE.md,GEMINI.mdand thedocs/agent files exist, andAGENTS.mdis at most 150 lines. -
Upstream CI (
.github/workflows/build.yml) is gated ongithub.repository == 'rclone/rclone'and the remote is Gitea, so this fork has no CI at all. Decide whether to add a Gitea Actions workflow.
Someday
Recurring
- Maintain
AGENTS.md:- Add a rule only in response to a real failure. Do not pre-empt hypothetical mistakes.
- Update in the same commit as the convention change.
- Prune quarterly, and re-check the Fork Workflow section against
upstream's
AGENTS.mdafter each upstream merge.
Known issues
RCLONE_CONFIG=/notfound go test ./...in the baregolang:1.26container fails 7 packages (list indocs/PERMISSIONS.md).fs/loggerneedsrsync; the mount, serve and smb failures are undiagnosed and are probably missing container tooling (FUSE, git-annex), not code. Confirm on a host with Go installed before treating a full-suite failure as a regression.- protondrive:
errNotSignedIn(session.go) tells the user to runrclone config reconnect remote:with the literal nameremote:; the CAPTCHA error was fixed to name the real remote inconnect, this one was not (seen in Task 15). - protondrive:
TestRegressionManyNewFscan't see from the fake server that key unlocks run one at a time; onlyTestLoadAccountSerialised(internal,unlockHook) checks it. - protondrive: an address key's
Token(account.gounlockAddressKey) is decrypted without a decompression limit, unlike node metadata (decryptMessage); a hostile server could send a compression bomb there too. Seen in Task 17.