-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix url in password reset email #12078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.22
Are you sure you want to change the base?
Fix url in password reset email #12078
Conversation
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12078 +/- ##
============================================
+ Coverage 3.58% 17.60% +14.01%
- Complexity 0 15613 +15613
============================================
Files 445 5911 +5466
Lines 37536 529987 +492451
Branches 6905 64751 +57846
============================================
+ Hits 1346 93278 +91932
- Misses 36024 426209 +390185
- Partials 166 10500 +10334
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a regression in the password reset email URL functionality introduced in PR #11379. The URL construction was broken because the domain URL was being included twice in the email template.
Key changes:
- Consolidated URL construction logic to build the complete reset link in code rather than in the email template
- Added fallback to use ManagementServerAddresses when UserPasswordResetDomainURL is not configured
- Added trailing slash removal to ensure clean URL formatting
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15767 |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks generally good, one question.
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-14834) |
|
@blueorangutan test |
|
@vladimirpetrov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14862)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
kiranchavala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dear @kiranchavala and @sureshanaparti , I appreciated the checks for the presence of This mindset should be applied universally, as users tend to accept whatever the default is. Beyond the general risk of “rogue Wi-Fi” exposing password-reset links, browsers are increasingly moving toward HTTPS-first behavior, and email filters/inspection systems are becoming more suspicious of plain-text HTTP URLs. Please understand this as purely constructive feedback. |
…server.properties file
@davift thanks for the feedback. earlier the password reset link was defaulted to |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15945 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14921)
|
| return properties; | ||
| } | ||
|
|
||
| public static boolean isHttpsEnabled() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it will be better to set a variable during initialization and just return that. Updating https and other things, require restarting server anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's already set in ServerDaemon, but not directly accessible. so checking it through server properties where the config is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vishesh92 update, please check.
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Show resolved
Hide resolved
vishesh92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16555 |
vishesh92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16559 |
kiranchavala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested with no value in user.password.reset.mail.domain.url
Tested with value user.password.reset.mail.domain.url set to kiranchavala.in
HTTP got appened
Tested with value user.password.reset.mail.domain.url to set to a port kiranchavala.in:908
Tested with value user.password.reset.mail.domain.url set to https




Description
This PR fixes the url in password reset email. (regression from #11379)
Fixes #12050
Doc PR: apache/cloudstack-documentation#621
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?