Skip to content

Fix user password reset mail template value #12882

Open
erikbocks wants to merge 4 commits intoapache:4.22from
scclouds:fix-reset-link-default-value
Open

Fix user password reset mail template value #12882
erikbocks wants to merge 4 commits intoapache:4.22from
scclouds:fix-reset-link-default-value

Conversation

@erikbocks
Copy link
Collaborator

Description

The #11379 and #12078 PRs changed the user password email template, stored in the user.password.reset.mail.template configuration 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 the 4.22.0.0 release 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.0 version to 4.22.1.0 version update script to update the user.password.reset.mail.template configuration 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
  • With HTTP:
Hello {{username}}!
You have requested to reset your password. Please click the following link to reset your password:
http://{{{resetLink}}}
If you did not request a password reset,please ignore this email.

Regards,
The CloudStack Team
  • With domainUrl:
Hello {{username}}!
You have requested to reset your password. Please click the following link to reset your password:
{{{domainUrl}}}{{{resetLink}}}
If you did not request a password reset,please ignore this email.

Regards,
The CloudStack Team
New default template
Hello {{username}}!
You have requested to reset your password. Please click the following link to reset your password:
{{{resetLink}}}
If you did not request a password reset,please ignore this email.

Regards,
The CloudStack Team

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

In an environment where the user.password.reset.mail.template configuration had the http:// 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.0 version. 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.

@erikbocks erikbocks changed the base branch from main to 4.22 March 24, 2026 20:00
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.60%. Comparing base (7c3637a) to head (dc929f1).

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     
Flag Coverage Δ
uitests 3.70% <ø> (ø)
unittests 18.67% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant