mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 18:37:46 +08:00
fix(ci): align lint-safe security paths
This commit is contained in:
@@ -1421,9 +1421,11 @@ WHERE id = ?
|
||||
&& current
|
||||
.tunnel_connected_at_unix_secs
|
||||
.is_some_and(|last_transition| event_time < last_transition);
|
||||
let persisted_detail = stale
|
||||
.then(|| format!("[stale_ignored] {event_detail}"))
|
||||
.unwrap_or(event_detail);
|
||||
let persisted_detail = if stale {
|
||||
format!("[stale_ignored] {event_detail}")
|
||||
} else {
|
||||
event_detail
|
||||
};
|
||||
self.insert_event(
|
||||
&mutation.node_id,
|
||||
Some(node.tunnel_generation.as_str()),
|
||||
@@ -1744,23 +1746,23 @@ fn proxy_node_registration_matches(
|
||||
&& current.heartbeat_interval == mutation.heartbeat_interval
|
||||
&& mutation
|
||||
.active_connections
|
||||
.map_or(true, |value| current.active_connections == value)
|
||||
.is_none_or(|value| current.active_connections == value)
|
||||
&& mutation
|
||||
.total_requests
|
||||
.map_or(true, |value| current.total_requests == value)
|
||||
.is_none_or(|value| current.total_requests == value)
|
||||
&& mutation
|
||||
.avg_latency_ms
|
||||
.map_or(true, |value| current.avg_latency_ms == Some(value))
|
||||
.is_none_or(|value| current.avg_latency_ms == Some(value))
|
||||
&& mutation
|
||||
.hardware_info
|
||||
.as_ref()
|
||||
.map_or(true, |value| current.hardware_info.as_ref() == Some(value))
|
||||
&& mutation.estimated_max_concurrency.map_or(true, |value| {
|
||||
current.estimated_max_concurrency == Some(value)
|
||||
})
|
||||
.is_none_or(|value| current.hardware_info.as_ref() == Some(value))
|
||||
&& mutation
|
||||
.estimated_max_concurrency
|
||||
.is_none_or(|value| current.estimated_max_concurrency == Some(value))
|
||||
&& current.tunnel_mode == mutation.tunnel_mode
|
||||
&& replacement_proxy_metadata
|
||||
.map_or(true, |value| current.proxy_metadata.as_ref() == Some(value))
|
||||
.is_none_or(|value| current.proxy_metadata.as_ref() == Some(value))
|
||||
&& current.updated_at_unix_secs == Some(now)
|
||||
}
|
||||
|
||||
|
||||
@@ -1887,9 +1887,9 @@ ON DUPLICATE KEY UPDATE id = id
|
||||
));
|
||||
}
|
||||
let now = current_unix_secs_i64();
|
||||
if !current
|
||||
if current
|
||||
.expires_at_unix_secs
|
||||
.is_some_and(|expires_at| expires_at > now.max(0) as u64)
|
||||
.is_none_or(|expires_at| expires_at <= now.max(0) as u64)
|
||||
{
|
||||
tx.commit().await.map_sql_err()?;
|
||||
return Ok(WalletMutationOutcome::Invalid(
|
||||
|
||||
Reference in New Issue
Block a user