Skip to content

Conversation

@alltheseas
Copy link
Contributor

@alltheseas alltheseas commented Nov 11, 2025

Problem

Notes spoofed from tens of years in the future
image

Summary

  • add shared helpers for ignoring notes more than 24h in the future and cover them with unit tests
  • drop spoofed future notes when building timelines or ingesting thread replies so they never render

Testing

  • cargo test time::tests::test_future_skew_helper

const ONE_YEAR_IN_SECONDS: u64 = 31_536_000; // 365 days

/// Maximum tolerated skew for note timestamps in the future (24h in seconds).
pub const MAX_FUTURE_NOTE_SKEW_SECS: u64 = ONE_DAY_IN_SECONDS;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably be more like 2 minutes

alltheseas and others added 2 commits November 20, 2025 14:17
changed "note from the future" max allowed to two (2) minutes from one (1) day
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants