From 9e0e5f680f2ef70ba84df5d047546168808ac20c Mon Sep 17 00:00:00 2001 From: Terra854 Date: Tue, 17 Nov 2026 19:17:33 +0800 Subject: [PATCH] Pin the validated shared SVG API and document parser guard --- Cargo.lock | 30 +++++++++++++++--------------- Cargo.toml | 2 +- crates/io/src/svg/decoder_edges.rs | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e602c4abf32..d2b97d8bc40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1379,7 +1379,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ "rayon", ] @@ -1472,12 +1472,12 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ "craft-dds", - "craft-jpeg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", - "craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", - "craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", + "craft-jpeg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", + "craft-metadata 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", + "craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", "crc32fast", "exr", "flate2", @@ -1525,7 +1525,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ "thiserror 2.0.21", ] @@ -1563,11 +1563,11 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ "brotli-decompressor 6.3.1", "chrono", - "craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", + "craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", "quick-xml 0.41.0", "serde", ] @@ -1771,10 +1771,10 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ - "craft-image-codecs 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", - "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", + "craft-image-codecs 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", + "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", "data-url", "flate2", "gif", @@ -1817,7 +1817,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ "serde", "thiserror 2.0.21", @@ -1900,7 +1900,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a#f32b47a1d4799269b7e4b99bb130161dcb7b312a" +source = "git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3#96dd8c4e0996b3d85edf5c98070c261892ac30f3" dependencies = [ "quick-xml 0.41.0", "serde", @@ -5620,7 +5620,7 @@ dependencies = [ "craft-cms", "craft-flags", "craft-image-codecs 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fe6b443acf3eccaf514064812e6e6bf24257652a)", - "craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", + "craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", "craft-update", "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fe6b443acf3eccaf514064812e6e6bf24257652a)", "dispatch2", @@ -5897,7 +5897,7 @@ dependencies = [ "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=5e2bc54a48c9f03e7ce4eca42775ce5cc051f5d6)", "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=b9c22554ce0fd2caccdb53b417082a2ff2ef178f)", "craft-psd 0.1.0 (git+https://github.com/storytold/craft-libs?rev=eafb50aff3c6b1acc14dff53060157877e3e4fce)", - "craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f32b47a1d4799269b7e4b99bb130161dcb7b312a)", + "craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=96dd8c4e0996b3d85edf5c98070c261892ac30f3)", "craft-tiff 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fe6b443acf3eccaf514064812e6e6bf24257652a)", "craft-xcf", "craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fe6b443acf3eccaf514064812e6e6bf24257652a)", diff --git a/Cargo.toml b/Cargo.toml index a9ac4625b05..b2b7fa5f901 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,7 +62,7 @@ craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "fe6b443acf craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "fe6b443acf3eccaf514064812e6e6bf24257652a" } craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "fe6b443acf3eccaf514064812e6e6bf24257652a" } craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "fe6b443acf3eccaf514064812e6e6bf24257652a" } -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "f32b47a1d4799269b7e4b99bb130161dcb7b312a", features = ["tree-render", "tree-render-system-fonts"] } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "96dd8c4e0996b3d85edf5c98070c261892ac30f3", features = ["tree-render", "tree-render-system-fonts"] } craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "fe6b443acf3eccaf514064812e6e6bf24257652a" } craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "fe6b443acf3eccaf514064812e6e6bf24257652a" } # Camera-field EXIF reader/writer, shared prerequisite craft-libs#1563. diff --git a/crates/io/src/svg/decoder_edges.rs b/crates/io/src/svg/decoder_edges.rs index 0a12d81eeea..894e25e24fe 100644 --- a/crates/io/src/svg/decoder_edges.rs +++ b/crates/io/src/svg/decoder_edges.rs @@ -17,7 +17,7 @@ pub(crate) struct LockGraph { } impl LockGraph { pub(crate) fn parse(text: &str) -> Self { - let lock: toml::Value = text.parse().unwrap(); + let lock: toml::Value = toml::from_str(text).unwrap(); let packages = lock .get("package") .unwrap()