Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ content. Before the first encrypted collection is uploaded, the manifest's
Each legacy domain is removed transactionally only after its matching encrypted
collection is stored, so an interrupted migration can safely resume.
Ciphertext uploads have collection-specific limits: 2 MiB for settings, 8 MiB
for profiles, playback speeds, and sessions, 16 MiB for subscriptions and playlist
bookmarks, and 64 MiB for playlists and history. The combined active encrypted
collections for one account cannot exceed 128 MiB.
for profiles, playback speeds, and versioned or legacy sessions, 16 MiB for
subscriptions and playlist bookmarks, and 64 MiB for playlists and history.
The combined active encrypted collections for one account cannot exceed 128 MiB.

### Secure device pairing

Expand Down
3 changes: 2 additions & 1 deletion src/handlers/encrypted_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn collection_limit(collection: &str) -> HandlerResult<usize> {
"settings" => Ok(2 * MEBIBYTE),
// Deprecated compatibility collection. Saved channel preferences now
// belong in `settings`; keep accepting this while old clients remain.
"sessions" | "profiles" | "playbackSpeeds" => Ok(8 * MEBIBYTE),
"sessions" | "sessionsV2" | "profiles" | "playbackSpeeds" => Ok(8 * MEBIBYTE),
"subscriptions" | "playlistBookmarks" => Ok(16 * MEBIBYTE),
"playlists" | "history" => Ok(MAX_ENCRYPTED_SYNC_BYTES),
_ => Err(HandlerError::ValidationErrorWithContext(
Expand Down Expand Up @@ -216,6 +216,7 @@ mod tests {
assert_eq!(collection_limit("settings").unwrap(), 2 * MEBIBYTE);
assert_eq!(collection_limit("profiles").unwrap(), 8 * MEBIBYTE);
assert_eq!(collection_limit("sessions").unwrap(), 8 * MEBIBYTE);
assert_eq!(collection_limit("sessionsV2").unwrap(), 8 * MEBIBYTE);
assert_eq!(collection_limit("subscriptions").unwrap(), 16 * MEBIBYTE);
assert_eq!(collection_limit("history").unwrap(), 64 * MEBIBYTE);
assert!(collection_limit("unknown").is_err());
Expand Down