Feature Updates Requested PBF PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
26 Feb 2024

Pull Request for Issue #42374.

Summary of Changes

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.

Testing Instructions

Type in your email adress with a space at the beginning.

Actual result BEFORE applying this Pull Request

Password reset fails.

Expected result AFTER applying this Pull Request

Password reset works.

Link to documentations

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

avatar Hackwar Hackwar - open - 26 Feb 2024
avatar Hackwar Hackwar - change - 26 Feb 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Feb 2024
Category Front End com_users
avatar joomdonation
joomdonation - comment - 26 Feb 2024

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, before validate="email" https://github.com/joomla/joomla-cms/blob/4.4-dev/components/com_users/forms/reset_request.xml#L10 instead

avatar brianteeman
brianteeman - comment - 4 Apr 2024

Personaly this is expected and intended behaviour and should not be accepted

avatar HLeithner
HLeithner - comment - 24 Apr 2024

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

avatar Hackwar Hackwar - change - 15 Aug 2024
Title
[4.4] Trim email before password reset request
[5.2] Trim email before password reset request
avatar Hackwar Hackwar - edited - 15 Aug 2024
avatar Hackwar Hackwar - change - 15 Aug 2024
Labels Added: Feature PR-4.4-dev PR-5.2-dev
avatar coolcat-creations
coolcat-creations - comment - 24 Aug 2024

that a great improvement for User Experience, thank you. I tested it but it does not work

grafik
avatar crommie crommie - test_item - 24 Aug 2024 - Tested unsuccessfully
avatar crommie
crommie - comment - 24 Aug 2024

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar muhme muhme - test_item - 24 Aug 2024 - Tested successfully
avatar muhme
muhme - comment - 24 Aug 2024

I have tested this item ✅ successfully on 95be583

Tested successfully with 5.2-dev

  • The user used could not have the superuser role, as no password reset mails are sent to them
  • It was already working before the patch as ¿all? modern browsers remove leading spaces for email fields (verified with Chrome developer tools inspecting network request)
  • Used one and multiple spaces before email address
  • Tested with 'Forgot your password?' and 'Forgot your username?'
  • Using emails with spaces before is still working after applying the PR
  • The interesting question is the used browser in the issue?
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.
avatar muhme
muhme - comment - 24 Aug 2024

@crommie I can confirm that Firefox is not accepting email address with leading space, but there is a clear error message Please enter an email address. In my view, this is valid browser behaviour and cannot and need not be influenced by this PR.

avatar crommie
crommie - comment - 24 Aug 2024

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.

avatar fgsw
fgsw - comment - 24 Aug 2024

So maybe the unsuccessful test should be removed

mark "not tested" at issue trackerand "submit test result".

avatar crommie crommie - test_item - 24 Aug 2024 - Not tested
avatar crommie
crommie - comment - 24 Aug 2024

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar crommie
crommie - comment - 24 Aug 2024

Yayyy, that worked, thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar HLeithner
HLeithner - comment - 2 Sep 2024

This pull request has been automatically rebased to 5.3-dev.

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.2] Trim email before password reset request
[5.3] Trim email before password reset request
avatar HLeithner HLeithner - edited - 2 Sep 2024
avatar Pritams43 Pritams43 - test_item - 22 Feb 2025 - Tested successfully
avatar Pritams43
Pritams43 - comment - 22 Feb 2025

I have tested this item ✅ successfully on 95be583

I have tested this item successfully and it is working as expected


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar crimle crimle - test_item - 22 Feb 2025 - Tested unsuccessfully
avatar crimle
crimle - comment - 22 Feb 2025

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?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar MacJoom
MacJoom - comment - 22 Feb 2025

With Chrome the problem cannot be reproduced, email is sent - no issue. Patch not needed or already fixed?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar MacJoom MacJoom - test_item - 22 Feb 2025 - Tested unsuccessfully
avatar MacJoom
MacJoom - comment - 22 Feb 2025

I have tested this item 🔴 unsuccessfully on 95be583


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar fgsw
fgsw - comment - 22 Feb 2025

@MacJoom Can you please provide the reasons for the test result?

avatar webfeuerflo
webfeuerflo - comment - 22 Feb 2025

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

avatar MacJoom
MacJoom - comment - 22 Feb 2025

@MacJoom Can you please provide the reasons for the test result?

See above

avatar fgsw
fgsw - comment - 22 Feb 2025

@MacJoom Thanks for the answer. I wasn't sure because of "Patch not needed or already fixed?".

avatar ceus1984 ceus1984 - test_item - 22 Feb 2025 - Tested unsuccessfully
avatar ceus1984
ceus1984 - comment - 22 Feb 2025

I have tested this item 🔴 unsuccessfully on 95be583

Errormessage: The email address you entered is invalid.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar cybersalt
cybersalt - comment - 22 Feb 2025

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar cybersalt cybersalt - test_item - 22 Feb 2025 - Tested unsuccessfully
avatar cybersalt
cybersalt - comment - 22 Feb 2025

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar HLeithner
HLeithner - comment - 4 Mar 2025

This pull request has been automatically rebased to 6.0-dev.

avatar HLeithner HLeithner - change - 4 Mar 2025
Title
[5.3] Trim email before password reset request
[6.0] Trim email before password reset request
avatar HLeithner HLeithner - edited - 4 Mar 2025
avatar richard67 richard67 - change - 26 Apr 2025
Labels Added: PBF PR-6.0-dev
Removed: PR-4.4-dev PR-5.2-dev
avatar richard67 richard67 - change - 26 Apr 2025
Build 4.4-dev 6.0-dev
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - Pritams43: Tested successfully
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - muhme: Tested successfully
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - MacJoom: Tested unsuccessfully
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - ceus1984: Tested unsuccessfully
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - crimle: Tested unsuccessfully
avatar richard67 richard67 - alter_testresult - 26 Apr 2025 - cybersalt: Tested unsuccessfully
avatar rbuelund rbuelund - test_item - 23 Aug 2025 - Tested unsuccessfully
avatar rbuelund
rbuelund - comment - 23 Aug 2025

I have tested this item 🔴 unsuccessfully on ae0c40c

In Chrome browser the "Forgot your password?" works both with space before e-mail and space after - the request is send.
In Firefox browser the request is blocked by the browser if adding a space in fornt or after the e-mail.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar HLeithner
HLeithner - comment - 31 Aug 2025

This pull request has been automatically rebased to 6.1-dev.

avatar HLeithner HLeithner - change - 31 Aug 2025
Title
[6.0] Trim email before password reset request
[6.1] Trim email before password reset request
avatar HLeithner HLeithner - edited - 31 Aug 2025
avatar Hackwar Hackwar - change - 9 Jan 2026
Labels Added: Updates Requested PR-6.1-dev
Removed: PR-6.0-dev
avatar tecpromotion tecpromotion - test_item - 9 Jan 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 9 Jan 2026

I have tested this item ✅ successfully on c7650ba

This works in the current versions of Chrome and Safari with and without the patch, as these browsers allow spaces.

In Firefox, it does not work with or without the patch. However, this is due to the behaviour of the browser, and a message appears.

Bildschirmfoto 2026-01-09 um 18 17 20
Screenshot: Firefox 146.0.1 (aarch64)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.
avatar crimle crimle - test_item - 30 Jan 2026 - Tested unsuccessfully
avatar crimle
crimle - comment - 30 Jan 2026

I have tested this item 🔴 unsuccessfully on c7650ba

It works with Edge but it does not work with Firefox.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

avatar Pierre-AmultisDev
Pierre-AmultisDev - comment - 31 Jan 2026

I have tested this item 🔴 unsuccessfully. Using Firefox 147.0.2.
When using an e-mail address with space and pressing submit on /index.php/component/users/reset i get a message to fill in a correct e-mail address.

I have tested this item ✅ successfully. Using Chrome 144.0.7559.110


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42893.

Add a Comment

Login with GitHub to post a comment