Skip to content

GH Issue 1644: Hash verification tokens and expire setup and reset links - #8211

Open
labkey-adam wants to merge 7 commits into
developfrom
fb_hash_verification_tokens_1644
Open

labkey-adam wants to merge 7 commits into
developfrom
fb_hash_verification_tokens_1644

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

Store only a hash of the setup, password-reset, and email-change verification tokens and expire setup and reset links, so that database contents alone can't be used to take over an account. GH Issue 1644

Related Pull Requests

Changes

  • Verification tokens are stored as SHA-256 hashes; an upgrade script hashes existing tokens in place
  • Setup links expire after seven days and reset links after one day; existing pending links expire seven days after upgrade
  • Verification tokens expire but are not deleted at expiration. This lets us distinguish already-used vs. never-used tokens to provide accurate user messaging.
  • Tokens no longer appear in user history or the server log
  • Because stored tokens can't be read back, the "show email" page masks the link; site admins can generate a new link there, which replaces the one already sent
  • Add a new email template substitution that conveys token expiration. Update default templates with expiration text.

@labkey-adam labkey-adam changed the title Database readers can take over accounts that have a pending setup or … GH Issue 1644: Hash verification tokens and expire setup and reset links Oct 21, 2026
Comment thread api/src/org/labkey/api/security/LoginManager.java
Comment thread core/resources/schemas/dbscripts/postgresql/core-26.008-26.009.sql
Comment thread core/src/org/labkey/core/security/SecurityController.java Outdated
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