Skip to content

Commit

Permalink
ensure warn on missing record
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Jan 15, 2024
1 parent cc94a4f commit 67ade78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tower-sessions-core/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ impl Session {
Some(loaded_record)
}
None => {
tracing::trace!("record not found in store");
// A well-behaved user agent should not send session cookies after
// expiration. Even so it's possible for an expired session to be removed
// after a request was initiated. However, such a race should be relatively
// uncommon and as such entering this branch could indicate malicious
// behavior.
tracing::warn!("possibly suspicious activity: record not found in store");
*self.session_id.lock() = None;
Some(self.create_record())
}
Expand Down

0 comments on commit 67ade78

Please sign in to comment.