User tests: Successful: Unsuccessful:
Pull Request for Issue #42374.
When typing in the email adress and accidentally adding a space at the front, the process fails. See the original issue linked above.
I read the original issue and I'm not sure if this is a bug or a feature or if we even want to interfer this way with this, but I decided to create a PR anyway, since it is easier to discuss with code directly instead of hypotheticals.
Type in your email adress with a space at the beginning.
Password reset fails.
Password reset works.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_users |
Personaly this is expected and intended behaviour and should not be accepted
would move it to 5.2, btw. if you already trim the email you could lowercase it too in php but I think it doesn't has an performance impact in sql
Title |
|
Labels |
Added:
Feature
PR-4.4-dev
PR-5.2-dev
|
I have tested this item ? unsuccessfully on 95be583
Firefox doesn't see it as an email address when I type in a space first.
Google Chrome does, and before AND after applying the patch, I get a message that the email is sent.
I have tested this item ✅ successfully on 95be583
Tested successfully with 5.2-dev
Email was sent before and after applying patch - in theory, because I tested on a PBF server site that didn't send emails at all. So maybe the unsuccessful test should be removed.
So maybe the unsuccessful test should be removed
mark "not tested" at issue trackerand "submit test result".
I have not tested this item.
Yayyy, that worked, thanks.
This pull request has been automatically rebased to 5.3-dev.
Title |
|
I have tested this item ✅ successfully on 95be583
I have tested this item successfully and it is working as expected
I have tested this item 🔴 unsuccessfully on 95be583
Using Firefox, password reset fails in any case, with or without patch. Firefox displays a little message «Please enter an email address» in either case. Maybe this issue is related to a certain brwoser?
With Chrome the problem cannot be reproduced, email is sent - no issue. Patch not needed or already fixed?
I have tested this item 🔴 unsuccessfully on 95be583
Without the patch the issue occurs in firefox, in chrome the password reset email is being sent, in firefox I see the message mentioned above. applying the patch doesn't change anything
I have tested this item 🔴 unsuccessfully on 95be583
Errormessage: The email address you entered is invalid.
I tested this in Chrome - entering an email with a space at the beginning worked with and without the patch. As for if this is needed or not, I am all for it since I cannot think of any circumstance where a person would intentionally put a space at the beginning of entering an email, so why not just save the frustration of it failing. Also, why not set things to remove a blank space at the end of an email as well, since sometimes double-clicking to select an email for cut and paste might accidentally grab a space that may be after it. Of course it is not needed if a space at the end doesn't break anything.
I have tested this item 🔴 unsuccessfully on 95be583
Sorry for the double post. I missed using the "Submit Test Result" feature - #noob!
I tested this in Chrome - entering an email with a space at the beginning worked with and without the patch. As for if this is needed or not, I am all for it since I cannot think of any circumstance where a person would intentionally put a space at the beginning of entering an email, so why not just save the frustration of it failing. Also, why not set things to remove a blank space at the end of an email as well, since sometimes double-clicking to select an email for cut and paste might accidentally grab a space that may be after it. Of course it is not needed if a space at the end doesn't break anything.
I remember I looked at this issue at PBF but could not replicate it for some reasons. If we want to trim space like this, I think we should add
filter="TRIM"
to the field, beforevalidate="email"
https://github.com/joomla/joomla-cms/blob/4.4-dev/components/com_users/forms/reset_request.xml#L10 instead