e41298f
commit e41298f
4 files changed
+45 -32
Showing 4 changed files+45-32
▼Cargo.lock
+5-4
| @@ -1045,9 +1045,9 @@ dependencies = [ | ||
1045 | 1045 | |
1046 | 1046 | [[package]] |
1047 | 1047 | name = "crossbeam-epoch" |
1048 | -version = "0.9.18" | |
1048 | +version = "0.9.20" | |
1049 | 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1050 | -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" | |
1050 | +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" | |
1051 | 1051 | dependencies = [ |
1052 | 1052 | "crossbeam-utils", |
1053 | 1053 | ] |
| @@ -2803,6 +2803,7 @@ dependencies = [ | ||
2803 | 2803 | "http-body-util", |
2804 | 2804 | "hyper", |
2805 | 2805 | "jsonschema", |
2806 | + "jsonwebtoken", | |
2806 | 2807 | "justapi-core", |
2807 | 2808 | "pyo3", |
2808 | 2809 | "pyo3-async-runtimes", |
| @@ -3965,9 +3966,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" | ||
3965 | 3966 | |
3966 | 3967 | [[package]] |
3967 | 3968 | name = "quick-xml" |
3968 | -version = "0.36.2" | |
3969 | +version = "0.41.0" | |
3969 | 3970 | source = "registry+https://github.com/rust-lang/crates.io-index" |
3970 | -checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" | |
3971 | +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" | |
3971 | 3972 | dependencies = [ |
3972 | 3973 | "memchr", |
3973 | 3974 | "serde", |
3974 | 3975 | |
▼Cargo.toml
+1-1
| @@ -46,7 +46,7 @@ serde = { version = "1", features = ["derive"] } | ||
46 | 46 | serde_json = "1" |
47 | 47 | serde_urlencoded = "0.7" |
48 | 48 | simd-json = { version = "0.14", features = ["serde_impl"] } |
49 | -quick-xml = { version = "0.36", features = ["serialize"] } | |
49 | +quick-xml = { version = "0.41", features = ["serialize"] } | |
50 | 50 | # Validation: Rust-native JSON Schema. `default-features = false` drops the |
51 | 51 | # `$ref` resolver's network/file backends (resolve-http/resolve-file/tls) |
52 | 52 | # we don't need — drafts + the `format` keyword are compiled in by |
53 | 53 | |
▼crates/justapi-core/src/xml.rs
+6-1
| @@ -159,12 +159,17 @@ pub fn xml_to_json(bytes: &[u8]) -> Result<serde_json::Value> { | ||
159 | 159 | insert_child(&mut stack, &name, val); |
160 | 160 | } |
161 | 161 | Ok(Event::Text(e)) => { |
162 | - let t = e.unescape().unwrap_or_default(); | |
162 | + let raw = std::str::from_utf8(e.as_ref()).unwrap_or_default(); | |
163 | + let t = quick_xml::escape::unescape(raw).unwrap_or_default(); | |
163 | 164 | text_buf.push_str(&t); |
164 | 165 | } |
165 | 166 | Ok(Event::CData(e)) => { |
166 | 167 | text_buf.push_str(&String::from_utf8_lossy(e.as_ref())); |
167 | 168 | } |
169 | + Ok(Event::GeneralRef(e)) => { | |
170 | + let raw = std::str::from_utf8(e.as_ref()).unwrap_or_default(); | |
171 | + text_buf.push_str(raw); | |
172 | + } | |
168 | 173 | Ok(Event::End(_)) => { |
169 | 174 | // If this is the only frame on the stack, closing it means the |
170 | 175 | // document root — build its value and return it directly. |
171 | 176 | |
▼deny.toml
+33-26
| @@ -1,20 +1,19 @@ | ||
1 | -# cargo-deny configuration | |
2 | -# See https://embarkstudios.github.io/cargo-deny/ for details | |
1 | +[graph] | |
2 | +targets = [] | |
3 | +all-features = false | |
4 | +no-default-features = false | |
5 | + | |
6 | +[output] | |
7 | +feature-depth = 1 | |
3 | 8 | |
4 | 9 | [advisories] |
5 | -vulnerability = "deny" | |
6 | -unmaintained = "warn" | |
7 | -notice = "warn" | |
8 | -# Ignore advisories that have been reviewed and accepted | |
9 | -ignore = [] | |
10 | -# CRATES.io advisory database | |
11 | -db-path = "~/.cargo/advisory-db" | |
12 | -db-urls = ["https://github.com/rustsec/advisory-db"] | |
10 | +ignore = [ | |
11 | + "RUSTSEC-2024-0436", # paste: unmaintained, transitive via candle-core/gemm — no replacement available | |
12 | + "RUSTSEC-2023-0071", # rsa: Marvin Attack timing side-channel, transitive via sqlx-mysql — no fix yet | |
13 | + # spin 0.9.8: yanked, transitive via flume → sqlx-sqlite — no impact on our usage | |
14 | +] | |
13 | 15 | |
14 | 16 | [licenses] |
15 | -unlicensed = "deny" | |
16 | -allow-osi-fsf-free = "neither" | |
17 | -# Only allow these licenses | |
18 | 17 | allow = [ |
19 | 18 | "MIT", |
20 | 19 | "Apache-2.0", |
| @@ -26,25 +25,27 @@ allow = [ | ||
26 | 25 | "Unicode-3.0", |
27 | 26 | "CC0-1.0", |
28 | 27 | "OpenSSL", |
28 | + "MPL-2.0", | |
29 | + "MIT-0", | |
30 | + "0BSD", | |
31 | + "CDLA-Permissive-2.0", | |
32 | + "BSL-1.0", | |
29 | 33 | ] |
30 | -deny = [ | |
31 | - "GPL-2.0", | |
32 | - "GPL-3.0", | |
33 | - "AGPL-3.0", | |
34 | - "LGPL-3.0", | |
35 | -] | |
36 | -# Skip these crates for license checking (internal crates) | |
37 | -skip = [ | |
38 | - { name = "justapi-core" }, | |
39 | - { name = "justapi-py" }, | |
40 | - { name = "justapi-cli" }, | |
41 | - { name = "justapi-bench" }, | |
42 | -] | |
34 | +confidence-threshold = 0.8 | |
35 | +exceptions = [] | |
36 | + | |
37 | +[licenses.private] | |
38 | +ignore = false | |
39 | +registries = [] | |
43 | 40 | |
44 | 41 | [bans] |
45 | 42 | multiple-versions = "warn" |
46 | 43 | wildcards = "allow" |
47 | 44 | highlight = "all" |
45 | +workspace-default-features = "allow" | |
46 | +external-default-features = "allow" | |
47 | +allow = [] | |
48 | +allow-workspace = false | |
48 | 49 | deny = [] |
49 | 50 | skip = [] |
50 | 51 | skip-tree = [] |
| @@ -52,4 +53,10 @@ skip-tree = [] | ||
52 | 53 | [sources] |
53 | 54 | unknown-registry = "deny" |
54 | 55 | unknown-git = "deny" |
56 | +allow-registry = ["https://github.com/rust-lang/crates.io-index"] | |
55 | 57 | allow-git = [] |
58 | + | |
59 | +[sources.allow-org] | |
60 | +github = [] | |
61 | +gitlab = [] | |
62 | +bitbucket = [] | |
56 | 63 | |