Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
hotfix for collab crashes (#11885)
Conrad Irwinba8aba4d17e9
diff --git a/crates/collab/src/db/queries/users.rs b/crates/collab/src/db/queries/users.rsindex b884f276de2..ff5c4d5c17e 100644--- a/crates/collab/src/db/queries/users.rs+++ b/crates/collab/src/db/queries/users.rs@@ -48,6 +48,9 @@ impl Database {/// Returns all users by ID. There are no access checks here, so this should only be used internally.pub async fn get_users_by_ids(&self, ids: Vec<UserId>) -> Result<Vec<user::Model>> {+ if ids.len() >= 10000_usize {+ return Err(anyhow!("too many users"))?;+ }self.transaction(|tx| async {let tx = tx;Ok(user::Entity::find()