diff --git a/README.md b/README.md index 78e820f..a2b079f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/handlers/encrypted_sync.rs b/src/handlers/encrypted_sync.rs index 0e2587e..bb98e6b 100644 --- a/src/handlers/encrypted_sync.rs +++ b/src/handlers/encrypted_sync.rs @@ -66,7 +66,7 @@ fn collection_limit(collection: &str) -> HandlerResult { "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( @@ -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());