? Language Change ? PBF Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
27 Sep 2020

Pull Request for Issue #15307

Summary of Changes

  • Make sure when we are not in debug mode there is a "general" message displayed.
  • On PW reset atempts for SU add the docs page & send the admin a mail explaining why he cant do this and how to do it.

This has been reported to the JSST by @brianteeman but has been decided to do it in the public tracker as this is a longstanding and public issue anyway. cc @joomla/security

Testing Instructions

  • install a site whith this patch applyed
  • create an non-superuser
  • try to reset the non-superuser
  • all should work correctly but with a different message
  • try to reset the superuser
  • there is now the same message but in the background a new mail is send to the super user telling him that he cant do what he wanted to do but how to do it.
  • enable joomla debug mode (and also make sure error reporting is active.
  • try to reset the super admin again
  • you now get the old error message but with the docs linked.

Actual result BEFORE applying this Pull Request

Different messages for different cases that could be used to do user emuration

Expected result AFTER applying this Pull Request

One general message used for all cases
In the special case of the SU there is a mail in the background to inform him about the steps he has to take.

Documentation Changes Required

None.

avatar zero-24 zero-24 - open - 27 Sep 2020
avatar zero-24 zero-24 - change - 27 Sep 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Sep 2020
Category Front End com_users Language & Strings
avatar zero-24
zero-24 - comment - 27 Sep 2020

hmm drone fails unrealted on an message that the dev dependencies can not be installed because the minimum PHP Version is 5.3.10.. Any idea how to overcome that error? @HLeithner @Hackwar ? https://ci.joomla.org/joomla/joomla-cms/35781/1/2

avatar zero-24 zero-24 - change - 27 Sep 2020
Labels Added: ? ?
avatar zero-24
zero-24 - comment - 27 Sep 2020

I have just applied the suggestions thanks @brianteeman

avatar richard67
richard67 - comment - 1 Oct 2020

@zero-24 Could you update the branch of this PR to current staging? There was a problem with failing tests in staging when the branch of this PR was created, which meanwhile has been solved. That should make tests for this PR pass again, hopefully.

avatar zero-24
zero-24 - comment - 1 Oct 2020

@zero-24 Could you update the branch of this PR to current staging? There was a problem with failing tests in staging when the branch of this PR was created, which meanwhile has been solved. That should make tests for this PR pass again, hopefully.

Done

avatar HLeithner
HLeithner - comment - 14 Dec 2020

@joomla/bug-squad can we have some tests here? I will create a RC tomorrow and I would like to have this merged.

avatar bayareajenn bayareajenn - test_item - 14 Dec 2020 - Tested unsuccessfully
avatar bayareajenn
bayareajenn - comment - 14 Dec 2020

I have tested this item ? unsuccessfully on 01fea2b

These items worked fine, test ok.
"install a site whith this patch applyed
create an non-superuser
try to reset the non-superuser
all should work correctly but with a different message"

These items didn't work for me.
"try to reset the superuser
there is now the same message but in the background a new mail is send to the super user telling him that he cant do what he wanted to do but how to do it.
enable joomla debug mode (and also make sure error reporting is active.
try to reset the super admin again
you now get the old error message but with the docs linked."

I never received an email telling me the steps I need to take to reset the super user pw. I don't think it's an email issue as the non-super user I set up DID send me verification codes via email.


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

avatar zero-24
zero-24 - comment - 15 Dec 2020

I never received an email telling me the steps I need to take to reset the super user pw. I don't think it's an email issue as the non-super user I set up DID send me verification codes via email.

hmm but you did got the "old" message right?

avatar bayareajenn
bayareajenn - comment - 16 Dec 2020

I never received an email telling me the steps I need to take to reset the super user pw. I don't think it's an email issue as the non-super user I set up DID send me verification codes via email.

hmm but you did got the "old" message right?

With the patch applied, I got the message:

"Notice
Empty message body
If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account."

Never got the email.

avatar zero-24
zero-24 - comment - 16 Dec 2020

Hmm that does not make sense will have to debug that. Just in case it should be send to the mail that is set in the super user that you try to reset.

Can you see any errors in the php error log? Maybe i messed up something here.

avatar bayareajenn
bayareajenn - comment - 16 Dec 2020

Can you see any errors in the php error log? Maybe i messed up something here.

I don't have any idea how to check for errors in the php error log. I know that sucks. I did try and in error_log.txt there was nothing there. Maybe I'd need to talk to Rochen about it?

avatar zero-24
zero-24 - comment - 16 Dec 2020

Ok no Problem, will have to add to debug this to my todo list.

avatar zero-24
zero-24 - comment - 18 Jan 2021

please test again @bayareajenn took longer than expected for sure :D

avatar bayareajenn bayareajenn - test_item - 19 Jan 2021 - Tested successfully
avatar bayareajenn
bayareajenn - comment - 19 Jan 2021

I have tested this item successfully on c4a13ef

It's working now. Got the new message with the patch applied:
"Notice

If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account."

Then I received the email stating:
"Hello,

A request has been made to reset your [SITE] account password. But, for security reasons, a Super User can't request a password reminder. Please contact another Super User or use an alternative method as described in the documentation: https://docs.joomla.org/Special:MyLanguage/How_do_you_recover_or_reset_your_admin_password0.000000"


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

avatar bayareajenn
bayareajenn - comment - 19 Jan 2021

I have tested this item successfully on c4a13ef

It's working now. Got the new message with the patch applied:
"Notice

If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account."

Then I received the email stating:
"Hello,

A request has been made to reset your [SITE] account password. But, for security reasons, a Super User can't request a password reminder. Please contact another Super User or use an alternative method as described in the documentation: https://docs.joomla.org/Special:MyLanguage/How_do_you_recover_or_reset_your_admin_password0.000000"


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

avatar brianteeman
brianteeman - comment - 19 Jan 2021

Is that the actual text of the email? If so then the link being generated is wrong

avatar bayareajenn
bayareajenn - comment - 19 Jan 2021

Is that the actual text of the email? If so then the link being generated is wrong

Yes, sir. That is the actual text of the email except that I removed the site title from it where it says [SITE].

avatar brianteeman
brianteeman - comment - 19 Jan 2021

Then that's a problem as thats not the url in the language string

https://docs.joomla.org/Special:MyLanguage/How_do_you_recover_or_reset_your_admin_password%3F

avatar bayareajenn
bayareajenn - comment - 19 Jan 2021

Shall I change my test result as unsuccessful then?

avatar bayareajenn
bayareajenn - comment - 19 Jan 2021

Ok, so just in case, I re-fetched github and re-applied the patch, and re-tested and the email still says the same as reported above.

avatar zero-24
zero-24 - comment - 19 Jan 2021

hmm just looked into my test mail and I can confirm this behavior but I'm not sure what is happening here.

Maybe @infograf768 can help here to understand what broke JText to not use the URL from the language string? I already had to do this: c4a13ef to get JText to use the full language string for some reason.

avatar brianteeman
brianteeman - comment - 19 Jan 2021

It could be the %3f at the end of the url (which is a ? character) or it could be something completely different.

Is there any reason for the url to be in the language string? Maybe you could try using sprintf and seeing if that solves it.

avatar zero-24
zero-24 - comment - 19 Jan 2021

It could be the %3f at the end of the url (which is a ? character) or it could be something completely different.

Ah I haven't noticed that. Yup seems that was the issue as after moving it it works now. Thanks!

Is there any reason for the url to be in the language string? Maybe you could try using sprintf and seeing if that solves it.

Not acutally but we usally have them in the strings but in this case it works the otherway too.

avatar brianteeman
brianteeman - comment - 19 Jan 2021

the url on the docs server does have the %3f

avatar zero-24
zero-24 - comment - 19 Jan 2021

the url on the docs server does have the %3f

Yes and it has to as the page without the question mark does not exist: https://docs.joomla.org/How_do_you_recover_or_reset_your_admin_password/

But i have not noticed nor thougt that this could be a problem so i assumed something is wrong with JText :D

avatar brianteeman
brianteeman - comment - 19 Jan 2021

Yes and it has to as the page without the question mark does not exist
That is what I was trying to say ;)

It's used without problem with JText in Joomla 4 with mod_login in the admin

avatar zero-24
zero-24 - comment - 19 Jan 2021

hmm maybe a combination with /n/n given that it worked partly when i used the $interpretBackSlashes = false switch.

avatar HLeithner
HLeithner - comment - 7 Apr 2021

I have the feeling there is not much interest in this pr... I will create the RC today without a fix and tests it will not make it again in to 3,9

avatar CharlieH96
CharlieH96 - comment - 15 Apr 2021

This is really an issue because if someone gets your Email, there is plenty of ways to get the password for the Email address, then go and reset the users Joomla password.

For example; https://haveibeenpwned.com/

avatar brianteeman
brianteeman - comment - 15 Apr 2021

@CharlieH96 Please test this

avatar HLeithner
HLeithner - comment - 15 Apr 2021

This PR doesn't solve this for sites with public registration it's only a small security through obscurity enhancement .

avatar zero-24 zero-24 - change - 9 Aug 2021
Labels Added: Language Change ?
Removed: ? ?
avatar zero-24 zero-24 - change - 21 Apr 2022
Labels Added: ?
Removed: ?
avatar RickR2H
RickR2H - comment - 22 Apr 2022

I have tested this item successfully on 7d28ead


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

avatar RickR2H RickR2H - test_item - 22 Apr 2022 - Tested successfully
avatar robinclapp
robinclapp - comment - 22 Apr 2022

I have tested this item successfully on 7d28ead


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

avatar robinclapp robinclapp - test_item - 22 Apr 2022 - Tested successfully
avatar RickR2H RickR2H - change - 22 Apr 2022
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 22 Apr 2022

RTC


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

avatar richard67
richard67 - comment - 22 Apr 2022

RTC


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

avatar laoneo laoneo - change - 23 Apr 2022
Labels Added: ? PBF
avatar laoneo laoneo - change - 23 Apr 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-04-23 18:47:49
Closed_By laoneo
avatar laoneo laoneo - close - 23 Apr 2022
avatar laoneo laoneo - merge - 23 Apr 2022
avatar laoneo
laoneo - comment - 23 Apr 2022

Thanks!

Add a Comment

Login with GitHub to post a comment