[PR #1695] [MERGED] Avoid crashing /account for tokens without a last access time #1695

Closed
opened 2026-05-07 01:03:16 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1695
Author: @ShipItAndPray
Created: 4/9/2026
Status: Merged
Merged: 4/11/2026
Merged by: @binwiederhier

Base: mainHead: fix/account-token-missing-last-access


📝 Commits (2)

  • 4b0a4ee web: allow setting token expiration to never when editing
  • 5d93cb4 Avoid formatting missing account token access times

📊 Changes

3 files changed (+96 additions, -80 deletions)

View changed files

📝 server/server_account_test.go (+9 -0)
📝 web/src/app/AccountApi.js (+2 -2)
📝 web/src/components/Account.jsx (+85 -78)

📄 Description

Summary

  • avoid formatting missing last_access values in the account token table
  • show a placeholder for never-used tokens instead of crashing the entire account page
  • only render the IP lookup action when a token actually has a last origin

Fixes #1651
Fixes #1684

Validation

  • npm run lint -- --ext .js,.jsx ./src/components/Account.jsx
  • npm run build

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/1695 **Author:** [@ShipItAndPray](https://github.com/ShipItAndPray) **Created:** 4/9/2026 **Status:** ✅ Merged **Merged:** 4/11/2026 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `fix/account-token-missing-last-access` --- ### 📝 Commits (2) - [`4b0a4ee`](https://github.com/binwiederhier/ntfy/commit/4b0a4eee3b8dba4ae033d102631a6a0c87ecc5d5) web: allow setting token expiration to never when editing - [`5d93cb4`](https://github.com/binwiederhier/ntfy/commit/5d93cb400aeff48f953d334cfaaee5bade6582cd) Avoid formatting missing account token access times ### 📊 Changes **3 files changed** (+96 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `server/server_account_test.go` (+9 -0) 📝 `web/src/app/AccountApi.js` (+2 -2) 📝 `web/src/components/Account.jsx` (+85 -78) </details> ### 📄 Description ## Summary - avoid formatting missing `last_access` values in the account token table - show a placeholder for never-used tokens instead of crashing the entire account page - only render the IP lookup action when a token actually has a last origin Fixes #1651 Fixes #1684 ## Validation - npm run lint -- --ext .js,.jsx ./src/components/Account.jsx - npm run build --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:03:16 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1695
No description provided.