Skip to content

Commit

Permalink
Avoid infinite loop when deserializing (#6550)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Oct 10, 2024
1 parent f257edb commit 7a9fefe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/libraries/types/src/gated_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl From<AccessGateConfig> for AccessGateConfigInternal {
impl From<AccessGateCombined> 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(),
}
}
Expand All @@ -86,7 +86,7 @@ impl From<AccessGateCombined> for AccessGateConfigInternal {
#[derive(Serialize, Deserialize)]
#[serde(untagged)]
pub enum AccessGateCombined {
AccessGateConfig(AccessGateConfigInternal),
AccessGateConfig { gate: AccessGate, expiry: Option<Milliseconds> },
Accessgate(AccessGate),
}

Expand Down

0 comments on commit 7a9fefe

Please sign in to comment.