mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5468] [MERGED] fix(frontend): guard IntlUtil.formatDate against out-of-range timestamps #5890
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5890
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5468
Author: @NikanZeyaei
Created: 6/21/2026
Status: ✅ Merged
Merged: 6/21/2026
Merged by: @MHSanaei
Base:
main← Head:fix/intl-formatdate-finite-check📝 Commits (1)
b15d4aafix(frontend): guard IntlUtil.formatDate against out-of-range timestamps📊 Changes
1 file changed (+4 additions, -1 deletions)
View changed files
📝
frontend/src/utils/index.ts(+4 -1)📄 Description
Summary
Closes https://github.com/MHSanaei/3x-ui/issues/5464
Guard
IntlUtil.formatDateagainst out-of-range timestamps so a single badexpiryTimecan't crash the clients page.Why
Backend
ExpiryTimeis a Goint64; JSDateonly accepts ±8,640,000,000,000,000 ms. A value beyond that yieldsInvalid Date, andIntl.DateTimeFormat.format(Invalid Date)throws — taking downClientsPagefor every user.Type of change
Areas affected
How was this tested?
Reproduced in browser devtools:
After the fix,
IntlUtil.formatDate(8640000000000001)returns''instead of throwing.Screenshots / recordings
N/A
Breaking changes
None
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.