diff --git a/rauthy-models/src/entity/sessions.rs b/rauthy-models/src/entity/sessions.rs index c6f547f1..a6a32a3f 100644 --- a/rauthy-models/src/entity/sessions.rs +++ b/rauthy-models/src/entity/sessions.rs @@ -440,11 +440,14 @@ impl Session { if (self.state == SessionState::Open || self.state == SessionState::Auth) && self.remote_ip.as_ref() != Some(&ip) { + let session_ip = self + .remote_ip + .as_ref() + .map(|ip| ip.as_str()) + .unwrap_or("UNKNOWN"); warn!( "Invalid access for session {} / {} with different IP: {}", - self.id, - self.remote_ip.as_ref().unwrap(), - ip, + self.id, session_ip, ip, ); return false; }