-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Add email link to set password. See issue #1205. #3262
Conversation
# Conflicts: # app/code/core/Mage/Adminhtml/controllers/CustomerController.php # app/code/core/Mage/Customer/Model/Customer.php
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php
Outdated
Show resolved
Hide resolved
…ass.php Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
I've tested but I've found a few problems:
|
@fballiano I tried to replicate your error: [backend] Create a customer:
In the email: click on the set password link, and set new password. I was not able to login. In backend, customer page:
Now go to frontend, I was able to login with the password I set. I also repeat the above but this time I created a customer associated to a website other than Admin. I was able to login with the set password. @fballiano What steps did you do? |
I've retested it now, so
the email is not sent, it doesn't enter the |
I've also retested a new customer creation
|
@fballiano Very strange, I retested, the email link worked for me, I managed to received the email. When creating a customer in backend with associated website set to admin, it is true that the password set in either admin or email will not work in any frontend store (by definition, admin cannot be a store in frontend; password associated with admin will not work in frontend). But when the associated website of the customer is set to a frontend store, the password will work on that store. This behavior has nothing to do with this PR, it always been like this. |
true, if I select the website then the password I set clicking the like works. but if I re-enter the newly created customer and re-check the "send password link" then I don't get another email :-\ maybe it's my setup, maybe mailhog is somehow filtering the double email, dunno |
if somebody can test this we could try to merge it although my tests failed |
@fballiano On the failure to login in frontend, is it because you associated the new customer to the default Admin website? Can you associate the customer to a frontend website? Then you should be able to login on that website with the password you set in backend. |
@addison74 would you test this PR by @kiatng cause I have some problems and I'm not sure if it is only because of my environment :-) |
Indeed, there are logical issues related to this feature. Below you may find a simple test I did in the latest OpenMage without applying this PR. If you create a 1 - No matter which password variant is chosen, after saving the customer, he does not receive any email, this is an big issue. 2 - If after saving the customer for the first time, one of the two password variant is used, surprisingly the customer receives an email with the following content There is no doubt the email contains wrong information. The customer is not the one who set the password and he cannot change the password in his account, because he doesn't have the password to access it. My opinion is he must receive the password set up by the administrator even if it is in the plain-text format and for security reasons, the message he receives must contain a warning message and a link to set a new password ASAP. In conclusion
After fixing these two issues, we can evaluate whether this PR is still requested or not. |
I tried to retest but cannot make it work, I'll convert this PR to draft. |
# Conflicts: # app/code/core/Mage/Customer/Model/Customer.php
There was a conflict, which is now resolved. Hopefully, this PR can now be tested. [edit] 2 additional files: LICENSE.txt and LICENSE_AFL.txt were committed. I do not know why but these 2 files are constantly causing problems in all my local repositories. |
@addison74 I think everything you said was said in PR #1205
This PR fixes the above issues by taking the suggestions from the comments in PR #1205. Ref the screenshots in PR #1283,
This PR is now so old, even I could not remember the details. |
@fballiano I edited the file LICENSE.txt directly in github by copying the entire text from here. Git still thinks the file is not the same as base. I have also tried this many times in my local repo, even though the text is copied from base, so there is no diff, but git thinks otherwise. Git must be right, but I do not know how to make the text the same as base. Any idea? |
@kiatng - I carefully read everything that was said about this problem. in addition, I added a feedback testing the OpenMage version without applying this PR. I will check again this PR and let you know my feedback |
@kiatng - When you have some time please give me a sign to finish this PR. It increases security level in OM. Just read my comments. |
I will retest again as this has been a while. |
During retest, I discovered a bug. I fixed it and retested. It's good for me now. I put it in production as well. |
Thank you for your time. in my case, I receive the message, visit the link and change the password, but I cannot log in with the new password. It could be an issue or not. Do you receive a confirmation email after creating an account in Backend? |
I will retest on the can't-login after password reset when I have the time, hopefully within next couple of weeks. |
Co-authored-by: Sven Reichel <github-sr@hotmail.com>
Co-authored-by: Sven Reichel <github-sr@hotmail.com>
@kiatng - I am able to log in, but please check it to confirm too. I did the test sending the link being logged in then logged out. In both cases it worked as expected. Also, I did not find any errors in logs. We can go further and move it from Draft. I found issues related to this password changing but I will report each as issues. |
I retested password reset multiple times, each time I can login with the new password. So, I think it is ready for review. |
Nice work, but should this have gone in |
Mhhh? No template changed. A new one has been added. I can't see how it could break anything. What do i miss? |
Trying to rebase PR #1283 to the
main
branch.Fixed Issues (if relevant)
Description (*)
When a customer account is created in backed, the password should not be emailed in plaintext. This PR add a new email template, which is modifed from the welcome email, by adding a link to set password.
For existing account, the email template used is the same as the forgot-password email.
This PR does not change existing feature on emailing plaintext password from backend, but it'll show a warning:
Manual testing scenarios (*)
There are 2 scenarios:
Creating New Customer
Existing Customer
Questions or comments
The landing page of the link is
customer/account/changeforgotten
with page title RESET PASSWORD. See screenshot. Does it need to be changed?Contribution checklist (*)