Skip to content

Bug 2066257 - clamp absurd logins timestamps - #7568

Open
jo wants to merge 1 commit into
mozilla:mainfrom
jo:bug-2066257
Open

Bug 2066257 - clamp absurd logins timestamps#7568
jo wants to merge 1 commit into
mozilla:mainfrom
jo:bug-2066257

Conversation

@jo

@jo jo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@jo
jo requested a review from bendk August 31, 2026 12:35

@bendk bendk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd rather use the server time if we could, since local clocks can have all kinds of weird behavior.

I think that could be done during sync, probably right here. You could iterate through records and clamp the timestamp for local to the server timestamp. You could also do the same for mirror and inbound, although I'm not sure if that's needed.

@jo
jo force-pushed the bug-2066257 branch 4 times, most recently from 3879cab to 8355278 Compare September 1, 2026 12:10
@jo

jo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Thank you, Ben, for these thoughts. Looking at it again I realized the problem could be fixed way simpler - this now just resets out-of-range timestamps to 0.

@jo
jo requested a review from bendk September 1, 2026 12:50
Set timestamps out of range to 0, similar to how Desktop handles this.
@jo

jo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I was able to find signals of these out of range timestamps in telemetry, I added the values to the testcases.

Desktop also sets these wrong timestamps to 0: https://searchfox.org/firefox-main/source/toolkit/components/passwordmgr/LoginManager.sys.mjs#6 - I have adjusted the patch to apply the very same sanitization here.

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