Skip to content

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

Merged
labkey-adam merged 7 commits into
developfrom
fb_hash_verification_tokens_1644
Oct 25, 2026
Merged

labkey-adam merged 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
labkey-adam added a commit to LabKey/testAutomation that referenced this pull request Oct 25, 2026
…nks (#3262)

## Rationale
Best practice to hash verification links and expire them. [GH Issue
1644](LabKey/internal-issues#1644)

## Related Pull Requests
- LabKey/platform#8211
@labkey-adam
labkey-adam merged commit 81ae077 into develop Oct 25, 2026
8 checks passed
@labkey-adam
labkey-adam deleted the fb_hash_verification_tokens_1644 branch October 25, 2026 20:29
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