diff options
| author | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-08-08 11:00:21 +0200 |
|---|---|---|
| committer | Kalle Lindström <karl.lindstrom@mullvad.net> | 2025-08-08 11:00:21 +0200 |
| commit | bd2b7a45caf834f6cd65c62432c342bc779f307b (patch) | |
| tree | 201e6504d8a9f91c41214448630b8521b10d43cd | |
| parent | dcace5318b9d4cd84e48802e9c8a4cfd783fc882 (diff) | |
| parent | 8d25bac564324061882a5d7b30def5a7735b87dc (diff) | |
| download | mullvadvpn-bd2b7a45caf834f6cd65c62432c342bc779f307b.tar.xz mullvadvpn-bd2b7a45caf834f6cd65c62432c342bc779f307b.zip | |
Merge branch 'recents-can-contain-an-invalid-multihop-selection-with-the-droid-2112'
| -rw-r--r-- | mullvad-types/src/settings/mod.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mullvad-types/src/settings/mod.rs b/mullvad-types/src/settings/mod.rs index 7e18f63c5a..b71280a7e9 100644 --- a/mullvad-types/src/settings/mod.rs +++ b/mullvad-types/src/settings/mod.rs @@ -139,6 +139,19 @@ impl TryFrom<&RelaySettings> for Recent { .ok_or("Location must be Constraint::Only")? .clone(); + if matches!( + entry, + LocationConstraint::Location(GeographicLocationConstraint::Hostname(..)) + ) && matches!( + location, + LocationConstraint::Location(GeographicLocationConstraint::Hostname(..)) + ) && entry == location + { + return Err( + "Multihop recent cannot have identical (country, city, host) triple.", + ); + } + Recent::Multihop { entry, exit: location, |
