Record the refresh race investigation and the remaining race detector
reports in the security tests, give the reasons the TestMain and two
crypto items are left, and tick Task 7 in the plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A saved session whose key password unlocks no key failed with "is the
password right?" alone; it now also says to run rclone config
reconnect, as other unusable saved sessions do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rclone config create, show and dump print the saved session, whose
salted key password outlives a sign out. Also say that a cache unused
for 10 minutes is forgotten, and make the fake server's init.d stop
kill protonfake if it hasn't stopped within 10s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An uncompressed encrypted name, passphrase, hash key or extended
attributes far larger than the limit for its kind was decrypted into
memory in full before being refused; one of 10 MiB took about 230 MiB
to list. It is now refused by its size first. Also wrap the error for
folders nested too deep once rather than at every level, where a
hostile server could make it about 88 KB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shutdown cancelled a poll in flight without waiting for it, so a poll
whose response had already arrived could still log after Shutdown
returned; the race detector caught one racing with a test's change to
the log level. Shutdown and Disconnect now wait for the poll, though
not for any notification it makes.
Also make TestPollerShutdownAndReuse wait for its polls rather than
count them after a fixed sleep, which failed under load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestListingRacingChange now releases its held request however it ends,
rather than hanging until the package timeout, protonfake's TestRun
stops and waits for its server on a failed assertion, and
TestClientBootstrapCreateVolumeRace starts both clients at once rather
than always waiting 2 s for one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Go's HTTP client drops only standard credential headers on a redirect
to another host, so pm-storage-token and x-pm-uid went with it; they
are now dropped too. Also let a later pass of a sync retry an upload
whose source changed while it was read, rather than failing it for
the whole run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A caller waiting for another's fetch of the same public keys got that
caller's context error if it was cancelled; it now fetches them
itself. Also:
- build each own address's public key ring once at sign-in rather
than on every lookup, 2-3 times per decrypted node
- a listing caching a node under a new parent forgets the old
parent's listing, as caching a single node already did
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server answering More with an anchor already followed made a listing
page until its context ended; it now fails at once. Also read an
extended attribute Size of null as missing, so the block sizes give
the size, rather than as 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With nothing subscribed to changes, a node cache neither read nor
filled for 10 minutes is now cleared, which stops polling until the
Fs is used again; before, an Fs never shut down polled for ever.
Also keep to one events request per interval:
- a Retry-After on an events request no longer holds up the listing
that filled the cache; it delays the next poll instead
- after Shutdown, polling resumes from the cursor it had, an interval
after reuse, instead of fetching a new cursor at once
- once the start cursor fetch has failed, the next is fetched after
the backoff rather than inline
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fstests waits 27 s for changes and Proton allows one events request per
30 s. The live events check otherwise passed; record its findings and
tick plan 002 Task 6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DirCacheFlush reset the directory cache to the volume root until the
root was found again, so a change notified in between would be named
relative to the volume root. It now keeps the root folder's ID, as
flushes made for change events do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A folder the node cache no longer held but the directory cache did, as
after the cache is cleared, was notified only by its new parent when
another client moved it, so a mount kept showing it at its old path.
Its old path is now notified as well, and flushed as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An item's event can be applied before rclone caches the item, as for
its own uploads and new folders. Its folder is still notified at once,
and the item itself is now notified at its path if it is cached within
the next two polls, with no extra requests. This makes mounts and the
FsChangeNotify integration test see exact paths for such items.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add ChangeNotify, fed by the volume events: an item is reported at its
old path, and its new folder if it moved, when it was cached; otherwise
its folder is reported. An expired cursor reports the root. Every event
batch also flushes the folders it names from the dircache, so a folder
renamed or moved by another client is found under its new path and
nothing is left at its old one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timing bounds in parallel tests leave room for a slow race runner, the
block 502 test checks its fault fired, refusedCommit's 408 exclusion is
pinned, the user docs explain the "server doesn't show it yet" error and
the conformance checklist matches the current draft and trust rules.
Every other minor from the review is listed in docs/TODO.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proton's generic "requirements not met" code 2000, which it returns for
a node changed since it was read (as when a lost rename response is
resent), aborted the whole run with "upgrade rclone". It is now an
ordinary error that isn't retried. Code 2028 (a feature disabled,
rate-limited or blocked) is retried, and the codes Proton actually uses
for a rejected or missing app version, 5003 and 5001, now give the
upgrade message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file whose extended attributes don't record its block sizes, as some
other clients write, was read from the first block for every ranged
read, so a multi-thread copy, which opens each chunk as a range,
downloaded data quadratically: about 8.5 GiB for a 1 GiB file. The sizes
of blocks already read are now remembered per Fs (bounded to 16
revisions and 65536 blocks), so later chunks start at the right block.
A block list that disagrees with what was learnt is an integrity error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A remote set up with environment variables or a connection string can't
save its draft client ID, so it got a new random one on every run, and a
draft left by an earlier run then blocked uploading that name as if
another client were uploading it. When the ID can't be saved it is now
derived from the remote name and the account's volume, so it is the same
on every run. A remote in the config file still gets a random ID, saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extended attributes whose signature failed or was missing were used, so
a server could set a file's modification time, size and SHA-1 at will:
for example make `rclone sync --update` skip every changed file. Without
ignore_signature_errors they are now not used and an ERROR is logged:
the modification time is the server's, there is no SHA-1, and the size
comes from the recorded block sizes, which reads check. The file stays
readable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A folder's hash key whose signature failed or was missing was only
logged, and the names of everything written into the folder were then
hashed with it, so a server which made the key could test guesses at
those names. Creating, uploading, renaming, moving or copying into such
a folder is now refused unless ignore_signature_errors is set, when an
ERROR is logged once per folder. Reading is unaffected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A node or share key from the server was unlocked with whatever Argon2
parameters it carried, so a crafted key could make every listing
including it allocate up to 2 TiB and crash rclone. Node and share keys
locked with Argon2 beyond 4 passes, parallelism 8 or 128 MiB are now
refused before the key derivation runs, as an integrity error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server could replace a file's content key with one it made, without a
signature: updates were then encrypted with a key the server knows, and
ranged reads returned whatever it encrypted under that key. A missing or
invalid content key signature now makes the file unverified, like an
unverified node key: reads and updates are refused unless
ignore_signature_errors is set, when an ERROR is logged once per file and
operation. The fake gains corruptions for this and for the hash key,
name and extended attribute checks that follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Captured from a throwaway test account on 2026-11-12 and re-keyed onto
test-only keys; no key, passphrase, ID or email of the account is in them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a failed commit the client read the file back and deleted the
draft if the read showed it uncommitted. Proton's server can take a
moment to show a commit, so a stale read could send a delete against a
file or revision which had in fact been committed.
The draft is now deleted only when the server refused the commit with a
4xx API error on a single attempt which was not resent; any other
failure leaves it and reports that the upload may have succeeded. A
cancelled upload whose commit succeeded stops waiting for the server to
show it at once. The fake server's read lag can also serve a file
without an active revision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The capture names its folder with -capture-remote and refuses -remote,
so a mistyped -run can't start the integration tests against the
account. Every key written has a placeholder user ID; a node key holding
another user's email, or a signature by or intended for a key not being
replaced, fails the capture without naming it. Salt notations are
written only where the original had one.
TestGoldenFixtures now also walks every key, key packet and signature of
a fixture, inside encrypted messages too, and checks folder modification
times; tampered fixtures are shown to fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proton's server can take a moment to show a change: a file read back
just after its commit may be missing or still a draft with no active
revision. Uploads then failed with "upload committed, but the file now
has another revision (revision is active ...)" or "object not found".
The read back after a commit, the read of a server-side copy and, with
enable_caching off, the read of a folder to write into now retry with
backoff for about 7 s while the change doesn't show. A committed upload
the server still doesn't show after that fails with a new "committed,
but the server doesn't show it yet" error, deletes nothing and is not
retried at once. The fake server gains SetReadLag to model the lag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestGoldenCapture (-capture DIR -capture-label NAME -remote NAME:PATH)
captures a folder another client wrote, re-keyed onto keys made for the
tests: blocks and signature-free SEIPD packets kept byte for byte, key
packets re-wrapped, signatures re-made with the same parameters (names,
hash keys and extended attributes encrypted again with their own session
keys, as their signatures are embedded), IDs and emails replaced.
TestGoldenFixtures reads every fixture in testdata/golden through the
backend from the fake server with every signature checked.
The fake server can now seed stored folders and keeps the times of
seeded nodes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file written by an old client without recorded block sizes was read
in ranges by assuming 4 MiB blocks, so a range past the first block could
return the wrong bytes, or too few, without an error. Such a range is now
read from the first block, discarding the bytes before it, with every
block still checked against its hash.
Also identify the SDK the conformance checklist was checked against by
commit, and align the enable_caching help with the docs page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the hand-written parts of the Proton Drive docs page for the
native client: browser and password sign-in with a transcript taken from
the current code, the third-party notice, what is verified on upload and
download, the ranged-read caveat, the trust rules and the
ignore_signature_errors option, the two protocol limits, the --dump
warning, filename rules, drafts, trash and limits. The generated options
section is left for make backenddocs.
Describe everything ignore_signature_errors allows in its help text,
update the feature list and score in protondrive.yaml, and add the SDK
conformance checklist and fork notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner added the rule; docs/PERMISSIONS.md already listed it in the
Allow tier. Also record that the force-with-lease deny rule misses the
`--force-with-lease=` form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The old libraries were only used by the differential crypto tests. Those
go, and TestFrozenFixtures moves into crypto_internal_test.go without its
-update branch, so files the old library wrote stay checked through the
frozen fixtures in testdata/oldlib. go mod tidy removes the two libraries
and the modules only they pulled in; relvacode/iso8601 leaves go.mod.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the TestProtonDriveFake init.d script, which builds and starts
protonfake on port 28642 and passes on the session it prints, and a
test_all entry for it, so fs/operations, fs/sync, vfs and cmd/bisync
run against the fake server. Five tests that need a second Fs of the
same account to see what the first wrote are ignored, as each Fs
caches separately, and cmd/gitannex is skipped as for every init.d
remote; both are in docs/TODO.md.
Add a Gitea Actions workflow that builds, vets, lints, race-tests,
fuzzes and vulnerability-checks the backend, and re-verify the agent
permission table on the host toolchain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>