Skip to content

fix: avoid username check date overflow - #197

Open
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/username-check-overflow
Open

fix: avoid username check date overflow#197
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/username-check-overflow

Conversation

@vycdev2

@vycdev2 vycdev2 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • avoid DateTime.AddDays overflow when a stored username-check timestamp is near the supported limit
  • reuse one UTC timestamp for the eligibility check and persisted update
  • add a regression test and changelog entry

Verification

  • dotnet test --no-restore --filter FullyQualifiedName~UsersServiceTests.TryUpdateUsername_DoesNotOverflowWhenNextCheckIsOutsideDateTimeRange — passed (1 test)
  • dotnet test --no-restore — passed (555 passed, 1 skipped)
  • dotnet build --no-restore — passed (0 warnings, 0 errors)
  • python3 -m unittest tools.test_generate_commands_md — passed (3 tests)
  • git diff --check upstream/develop...HEAD — passed

Risk

  • Low: the ten-day eligibility rule is unchanged; only the comparison avoids constructing an out-of-range date.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

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.

1 participant