A sink attached to an open public-link client missed the two handshake
requests, and every handshake replayed to replace an expired session,
because those go through the session-less helpers. Stream's playback
benchmark needs them to count what opening a share costs.
`open_with_telemetry` and `info_with_telemetry` take the sink before the
first request. It reaches the handshake, the anonymous session's API
calls and block downloads, and each renewal. The handshake routes are
reported under fixed labels, because their paths carry the link token.
`get_unauthenticated_observed` and `post_unauthenticated_observed` time
one logical call under a caller-given route. The existing helpers
delegate to them with no sink.
Every upload into a folder read the folder's link again for the key that
hashes its children's names. The key is now cached next to the folder's node
key and dropped with it on the folder's events.
upload_new_revision_over uploads a revision only over the revision the caller
expects. It answers Moved or Trashed, sending nothing, when the file moved on
or is in the trash. The check uses the read of the file's link the upload
needs for its keys, so a caller that read the file itself first can drop that
read.
The revision history live test told the superseded revisions apart by
creation time. Small revisions can land within one second, so it now tells
them apart by size.
Add upload_file_replacing_draft_sealed and upload_new_revision_sealed.
They return a SealedUpload with the file's uid and the id of the
revision they sealed. Drive often does not list a node made a moment
ago, so reading the file back to learn the id often got nothing.
Sealing a revision now also drops the file's node from the entity
cache. Before, get_node kept reporting the replaced revision as active
until a Drive event invalidated it.
The server answers DELETE volumes/{vid}/trash with HTTP 202 and empties
the trash in the background. The generic response parser reports the
202 envelope as an error, so every successful empty came back as
"proton api error Unknown (http 202): Accepted". Accept it, the same
way restore_revision already does.
The trash listing sent its paging parameters in lower case, unlike every
other paged request, and asked for another page while pages came back
full. On a large trash it never finished, so callers timed out and never
saw most of it. Send Page and PageSize, and stop when a page brings no
link already seen, with a hard cap of 10 000 pages.
Add enumerate_trashed_nodes_light, which returns each trashed node with
the time it was trashed, and release 0.12.5.
ProtonPhotosClient::find_missing_thumbnails reads link details in batches and
returns the photos that list no thumbnail, confirming each through its
revision. Nothing is downloaded. Photos-volume links carry their file
properties under the photo record, which is read as well.
Bumps the version to 0.12.4.
download_thumbnail read the link, the revision's whole block list, the
thumbnail URL and the blob, one after another, for every thumbnail. The
thumbnail ids now come from the link details when the API lists them,
and the client remembers each file's content key and thumbnail ids for
up to 4096 files, so repeats, retries and preview fallbacks need only
the URL and the blob. Node events and failed fetches drop entries.
Release 0.12.3.
Port upstream 271f64e4. Folder creation and streaming file/revision
uploads retain the UTC offset and fractional seconds in encrypted
attributes. Downloaded claimed timestamps stay verbatim strings.
PhotoUploadMetadata has a separate last_modification_time; capture_time
no longer supplies it. Reconcile the remaining upstream commits and pin
to 05c91159.
BREAKING CHANGE: modification-time inputs take Option<ModificationTime>
(DateTime<FixedOffset>) instead of epoch seconds. Photo metadata literals
need the new field or Default; set both times to preserve the former
capture-time fallback.
A wrong mailbox password surfaced as InvalidOperation("no active user key could
be unlocked"), which a caller could only recognise by its text. It is now
ProtonError::KeysLocked, and AccountClient::unlock() checks a secret with a
single core/v4/users request instead of loading every address.
Derived passphrases, the mailbox password and the cache encryption key were
plain Vec<u8>s, cloned freely and never wiped. They are Zeroizing now, and the
passphrase map is KeyPassphrases: wiped on drop, redacted in Debug, with
derive_secret() for a client that wants a key only an unlocked account can
reproduce. with_key_passphrases takes it.
Breaking: ProtonError gains a variant, key_passphrases() and
with_key_passphrases() change type, and derive_key_passphrase returns
Zeroizing<Vec<u8>>.
Port upstream 0aabea59: report_recently_accessed on ProtonDriveClient and
ProtonPhotosClient, batches of 50. Also read the ThirdParty/Sdk flags from
f257c20e on link and revision DTOs. Pin bumped to df3a717b.