Fix user password reset mail template value #12882
Open
erikbocks wants to merge 4 commits intoapache:4.22from
Open
Fix user password reset mail template value #12882erikbocks wants to merge 4 commits intoapache:4.22from
erikbocks wants to merge 4 commits intoapache:4.22from
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12882 +/- ##
============================================
+ Coverage 3.70% 17.60% +13.90%
- Complexity 0 15663 +15663
============================================
Files 448 5917 +5469
Lines 38041 531524 +493483
Branches 7038 64981 +57943
============================================
+ Hits 1409 93572 +92163
- Misses 36445 427398 +390953
- Partials 187 10554 +10367
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
The #11379 and #12078 PRs changed the user password email template, stored in the
user.password.reset.mail.templateconfiguration value. However, these changes were only made to the configuration's default value, and the database's configuration value was not changed. This caused environments that were deployed before the4.22.0.0release to face errors due to outdated configuration values, such as the duplicated HTTP protocol in the URL.This PR adds a step in the
4.22.0.0version to4.22.1.0version update script to update theuser.password.reset.mail.templateconfiguration value to the current value, if its current value matches one of the old defaults. The step changes the configuration's value only if the current value is one of the outdated default ones, keeping customized templates untouched.Old default templates
domainUrl:New default template
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
In an environment where the
user.password.reset.mail.templateconfiguration had thehttp://value, I manually executed the query to replace the configuration's value, and asserted that the value was changed accordingly. Then, I updated the configuration to the{{{domainUrl}}}outdated template, and manually executed the query one more time. The configuration's value was updated to the current template successfully.In order to test ACS' automatic update behavior, the query was inserted to the version update SQL file, and the packages with the changes were installed in an environment previous to the
4.22.1.0version. The correct behavior was observed for both of the outdated templates.With the environment updated in the previous step, a password reset email was sent, and I validated that the template was working properly.