diff --git a/src/webxdc.rs b/src/webxdc.rs index d249b539a..e107c8782 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -63,11 +63,6 @@ const WEBXDC_DEFAULT_ICON: &str = "__webxdc__/default-icon.png"; /// it is planned to raise that limit as needed in subsequent versions. const WEBXDC_SENDING_LIMIT: u64 = 655360; -/// Be more tolerant for .xdc sizes on receiving - -/// might be, the senders version uses already a larger limit -/// and not showing the .xdc on some devices would be even worse ux. -const WEBXDC_RECEIVING_LIMIT: u64 = 4194304; - /// Raw information read from manifest.toml #[derive(Debug, Deserialize, Default)] #[non_exhaustive] @@ -218,14 +213,6 @@ impl Context { return Ok(false); } - if file.len() as u64 > WEBXDC_RECEIVING_LIMIT { - info!( - self, - "{} exceeds receiving limit of {} bytes", &filename, WEBXDC_RECEIVING_LIMIT - ); - return Ok(false); - } - let archive = match async_zip::read::mem::ZipFileReader::new(file.to_vec()).await { Ok(archive) => archive, Err(_) => { @@ -905,8 +892,6 @@ mod tests { async fn test_webxdc_file_limits() -> Result<()> { assert!(WEBXDC_SENDING_LIMIT >= 32768); assert!(WEBXDC_SENDING_LIMIT < 16777216); - assert!(WEBXDC_RECEIVING_LIMIT >= WEBXDC_SENDING_LIMIT * 2); - assert!(WEBXDC_RECEIVING_LIMIT < 16777216); Ok(()) }