Repository navigation
Preserve password expiry countdowns in notification history - #5456
Merged
nilsteampassnet merged 1 commit intoNov 9, 2026
Merged
Conversation
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.
Description
Opening the notification inbox a week after a password's D-14 warning made both the D-14 and D-7 entries say "expires in 7 days". Each entry recomputed its countdown from the absolute expiry and the browser's current time, making separate warning milestones look like duplicate notifications.
Use the days remaining recorded at delivery so each message stays consistent with its displayed creation date. This also preserves the original tomorrow/expired messages and warnings delivered between milestones. Existing stored notifications already contain this value, so they benefit immediately without a migration. Password policy enforcement and notification scheduling are unchanged.
Published commit:
8c2c0c6fc— Preserve password expiry notification countdowns.Related issue
Reported from a personal instance; no linked issue.

Type of change
How has this been tested?
--test --test-isolation=nonebecause Windows sandboxing prevents child-process creation.php _tools/phpunit.phar tests/Unit/NotificationCenterLogicTest.php: 16 tests, 61 assertions passed with PHP 8.2.34.app/config/settings.phpis absent. On commit8c2c0c6fc, GitHub Actions passed the complete PHP 8.2 and PHP 8.3 suites (3,564 tests / 84,111 assertions each), JavaScript tests, PHPStan level 4, MariaDB integration tests, CodeQL, and both repository guards. Scrutinizer also passed. All CI checks are green on this final commit.Checklist
php app/vendor/bin/phpstan analyse --memory-limit=2G)php _tools/phpunit.phar— see CONTRIBUTING.md for the one-time setup)var_dump()orconsole.log()left in the codeapp/sources/*.queries.phpfiles have a matchingpublic/sources/proxy shim (none added)teampassclasseswere applied to both copies (app/includes/libraries/andapp/vendor/) (none changed)app/vendor/composer/is in its production form (unchanged)Impact on install / upgrade
install/upgrade_run_X.X.X.phpscript is included and the fresh install path was testedScreenshots
No visual layout changes; the regression tests cover the notification text.