From 7a9fefeb1534edfd1091eea601716acc6f19f879 Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Thu, 10 Oct 2024 13:27:40 +0100 Subject: [PATCH] Avoid infinite loop when deserializing (#6550) --- backend/libraries/types/src/gated_groups.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/libraries/types/src/gated_groups.rs b/backend/libraries/types/src/gated_groups.rs index 0c83904382..083821142a 100644 --- a/backend/libraries/types/src/gated_groups.rs +++ b/backend/libraries/types/src/gated_groups.rs @@ -77,7 +77,7 @@ impl From for AccessGateConfigInternal { impl From for AccessGateConfigInternal { fn from(value: AccessGateCombined) -> Self { match value { - AccessGateCombined::AccessGateConfig(access_gate_config) => access_gate_config, + AccessGateCombined::AccessGateConfig { gate, expiry } => AccessGateConfigInternal { gate, expiry }, AccessGateCombined::Accessgate(access_gate) => access_gate.into(), } } @@ -86,7 +86,7 @@ impl From for AccessGateConfigInternal { #[derive(Serialize, Deserialize)] #[serde(untagged)] pub enum AccessGateCombined { - AccessGateConfig(AccessGateConfigInternal), + AccessGateConfig { gate: AccessGate, expiry: Option }, Accessgate(AccessGate), }