Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 48 additions & 205 deletions Cargo-minimal.lock

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1857,15 +1857,6 @@ dependencies = [
"digest 0.10.7",
]

[[package]]
name = "home"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
"windows-sys 0.59.0",
]

[[package]]
name = "http"
version = "1.5.0"
Expand Down Expand Up @@ -2763,8 +2754,6 @@ dependencies = [
"async-trait",
"bdk_wallet",
"getrandom 0.2.17",
"icu_locale_core",
"icu_provider",
"lazy_static",
"payjoin",
"payjoin-test-utils",
Expand All @@ -2784,7 +2773,6 @@ name = "payjoin-fuzz"
version = "0.0.1"
dependencies = [
"arbitrary",
"home",
"libfuzzer-sys",
"payjoin",
]
Expand Down Expand Up @@ -2838,7 +2826,6 @@ dependencies = [
"tower-http",
"tracing",
"tracing-subscriber",
"unicode-segmentation",
"uuid",
]

Expand Down Expand Up @@ -5183,15 +5170,6 @@ dependencies = [
"windows-targets",
]

[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]

[[package]]
name = "windows-sys"
version = "0.61.2"
Expand Down
7 changes: 1 addition & 6 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "payjoin-fuzz"
version = "0.0.1"
publish = false
edition = "2021"
edition = "2024"

[package.metadata]
cargo-fuzz = true
Expand All @@ -12,7 +12,6 @@ default = []

[dependencies]
arbitrary = { version = "1.0.1" }
home = "=0.5.11"
libfuzzer-sys = { version = "0.4.10" }
payjoin = { path = "../payjoin", default-features = false, features = [
"arbitrary",
Expand All @@ -21,10 +20,6 @@ payjoin = { path = "../payjoin", default-features = false, features = [
"v2",
] }

# Pinned transitive dependencies that appear unused to cargo-machete
[package.metadata.cargo-machete]
ignored = ["home"]

[[bin]]
name = "uri_deserialize_pjuri"
path = "fuzz_targets/uri/deserialize_pjuri.rs"
Expand Down
14 changes: 7 additions & 7 deletions fuzz/fuzz_targets/directory/short_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ fn do_test(data: &[u8]) {
// Path 2: attacker-controlled URL path segment, decoded as bech32
// without a checksum. This is the actual parsing path exercised by
// payjoin-mailroom when routing /{id} requests.
if let Ok(s) = std::str::from_utf8(data) {
if let Ok(id) = s.parse::<ShortId>() {
let reencoded = id.to_string();
let reparsed: ShortId =
reencoded.parse().expect("re-encoding a parsed ShortId must re-parse");
assert_eq!(reparsed, id, "round-trip mismatch via FromStr/Display: {s}");
}
if let Ok(s) = std::str::from_utf8(data)
&& let Ok(id) = s.parse::<ShortId>()
{
let reencoded = id.to_string();
let reparsed: ShortId =
reencoded.parse().expect("re-encoding a parsed ShortId must re-parse");
assert_eq!(reparsed, id, "round-trip mismatch via FromStr/Display: {s}");
}
Comment thread
benalleng marked this conversation as resolved.
}

Expand Down
8 changes: 4 additions & 4 deletions fuzz/fuzz_targets/url/arbitrary_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ fn do_test(data: &[u8]) {
url.query_pairs_mut().append_pair(key, value);
url.clear_query();
}
if let Some(mut segs) = url.path_segments_mut() {
if let Ok(segment) = u.arbitrary::<&str>() {
segs.push(segment);
}
if let Some(mut segs) = url.path_segments_mut()
&& let Ok(segment) = u.arbitrary::<&str>()
{
segs.push(segment);
}
if let Ok(segment) = String::arbitrary(&mut u) {
let _ = url.join(&segment);
Expand Down
2 changes: 1 addition & 1 deletion payjoin-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
keywords = ["bip78", "payjoin", "bitcoin"]
categories = ["cryptography::cryptocurrencies", "network-programming"]
license = "MITNFA"
edition = "2021"
edition = "2024"
rust-version = "1.85"
exclude = ["tests"]

Expand Down
6 changes: 2 additions & 4 deletions payjoin-ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "payjoin-ffi"
version = "0.24.0"
edition = "2021"
edition = "2024"
license = "MIT OR Apache-2.0"
exclude = ["tests"]

Expand All @@ -24,8 +24,6 @@ path = "uniffi-bindgen.rs"
[dependencies]
async-trait = "0.1.89"
getrandom = "0.2.10"
icu_locale_core = "=2.0.1"
icu_provider = "=2.0.0"
lazy_static = "1.5.0"
payjoin = { version = "1.0.0", features = ["v1", "v2"] }
payjoin-test-utils = { version = "0.0.1", optional = true }
Expand All @@ -40,7 +38,7 @@ url = "2.5.4"

# Pinned transitive dependencies that appear unused to cargo-machete
[package.metadata.cargo-machete]
ignored = ["getrandom", "icu_provider", "icu_locale_core", "socks"]
ignored = ["getrandom", "socks"]

[dev-dependencies]
bdk_wallet = { version = "3.1.0", features = ["all-keys"] }
Expand Down
2 changes: 1 addition & 1 deletion payjoin-ffi/dart/native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "3"
name = "payjoin-ffi-wrapper"
description = "This is a simple wrapper crate which re-exports payjoin-ffi for publishing to pub.dev"
version = "0.1.0"
edition = "2021"
edition = "2024"
rust-version = "1.85"
license = "MIT OR Apache-2.0"
publish = false
Expand Down
11 changes: 2 additions & 9 deletions payjoin-ffi/javascript/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "payjoin-test-utils-napi"
version = "0.1.0"
edition = "2021"
edition = "2024"

[lib]
crate-type = ["cdylib"]
Expand All @@ -12,18 +12,11 @@ napi-derive = "2.16.13"
serde_json = "1.0.149"
tokio = { version = "1.52.3", features = ["full"] }

icu_locale_core = "=2.0.1"
icu_provider = "=2.0.0"

# Pinned transitive dependencies that appear unused to cargo-machete
[package.metadata.cargo-machete]
ignored = ["icu_provider", "icu_locale_core"]

[dependencies.payjoin-test-utils]
path = "../../../payjoin-test-utils"

[build-dependencies]
napi-build = "=2.2.4"
napi-build = "2.2.4"

[patch.crates-io.payjoin]
path = "../../../payjoin"
Expand Down
2 changes: 1 addition & 1 deletion payjoin-ffi/uniffi-bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn uniffi_bindgen() {
.position(|arg| arg == "--out-dir")
.and_then(|idx| args.get(idx + 1))
.expect("--out-dir is required when using --library");
uniffi_dart::gen::generate_dart_bindings(
uniffi_dart::r#gen::generate_dart_bindings(
"src/payjoin.udl".into(),
Some("uniffi.toml".into()),
Some(output_dir.as_str().into()),
Expand Down
7 changes: 1 addition & 6 deletions payjoin-mailroom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories = [
"web-programming",
]
license = "MITNFA"
edition = "2021"
edition = "2024"
rust-version = "1.85.0"

[features]
Expand Down Expand Up @@ -87,11 +87,6 @@ tower = "0.5.2"
tower-http = { version = "0.6.11", features = ["trace"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
unicode-segmentation = "=1.12.0"

# Pinned transitive dependencies that appear unused to cargo-machete
[package.metadata.cargo-machete]
ignored = ["unicode-segmentation"]

[dev-dependencies]
mockito = "1.7.0"
Expand Down
2 changes: 1 addition & 1 deletion payjoin-mailroom/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ pub async fn serve_acme(
/// Generate random sentinel tag at startup.
/// The relay and directory share this tag in a best-effort attempt
/// at detecting self loops.
fn generate_sentinel_tag() -> SentinelTag { SentinelTag::new(rand::thread_rng().gen()) }
fn generate_sentinel_tag() -> SentinelTag { SentinelTag::new(rand::thread_rng().r#gen()) }

#[cfg(feature = "access-control")]
impl Connected<IncomingStream<'_, Listener>> for middleware::MaybePeerIp {
Expand Down
9 changes: 4 additions & 5 deletions payjoin-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "payjoin-test-utils"
version = "0.0.1"
edition = "2021"
edition = "2024"
authors = ["Dan Gould <d@ngould.dev>"]
description = "Payjoin test utilities"
repository = "https://github.com/payjoin/rust-payjoin"
Expand Down Expand Up @@ -34,15 +34,14 @@ ohttp = { package = "bitcoin-ohttp", version = "0.6.0", optional = true }
once_cell = "1.21.3"
payjoin = { version = "1.0.0", default-features = false }
payjoin-mailroom = { version = "0.1.2", features = ["_manual-tls"] }
tar = "0.4.20"
# Pin to 0.14.7 (last version to support our MSRV 1.85)
rcgen = { version = "=0.14.7", optional = true }
rcgen = { version = "0.14.7", optional = true }
reqwest = { version = "0.12.23", default-features = false, features = [
"rustls-tls",
], optional = true }
rustls = { version = "0.23.38", default-features = false, features = [
"ring",
], optional = true }
tar = "0.4.9"
tempfile = { version = "3.20.0", optional = true }
# Pin to 0.3.45 (last version to support our MSRV 1.85)
time = "=0.3.45"
Expand All @@ -52,4 +51,4 @@ tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }

# Pinned transitive dependencies that appear unused to cargo-machete
[package.metadata.cargo-machete]
ignored = ["time", "tar"]
ignored = ["tar", "time"]
2 changes: 1 addition & 1 deletion payjoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = [
"network-programming",
]
license = "MITNFA"
edition = "2021"
edition = "2024"
rust-version = "1.85"
exclude = ["tests"]

Expand Down
2 changes: 1 addition & 1 deletion treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
rustfmt = {
enable = true;
package = pkgs.rustToolchains.nightly;
edition = "2021";
edition = "2024";
};
shellcheck = {
enable = true;
Expand Down
Loading