Repository navigation
GH Issue 1644: Hash verification tokens and expire setup and reset links - #3262
Merged
Merged
Conversation
labkey-adam
requested review from
labkey-jeckels,
labkey-matthewb and
labkey-tchad
October 22, 2026 00:00
labkey-jeckels
approved these changes
Oct 22, 2026
labkey-tchad
approved these changes
Oct 23, 2026
labkey-adam
added a commit
to LabKey/platform
that referenced
this pull request
Oct 25, 2026
…nks (#8211) ## 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](LabKey/internal-issues#1644) ## Related Pull Requests - LabKey/testAutomation#3262 ## 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Best practice to hash verification links and expire them. GH Issue 1644
Related Pull Requests