? ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
16 Sep 2021

Summary of Changes

I got some reports from user, that they land on the error page when they try to validate their account. When I check their account they are already verified and activated. The issue is, that some email application pre-fetch urls (and show e.g. previews) which triggers the validation and if then the user clicks, Joomla! throws an exception.

Testing Instructions

  • Set registration to user activation
  • Register a new user
  • click on the verification link
  • click again on the verification link

Actual result BEFORE applying this Pull Request

grafik

Expected result AFTER applying this Pull Request

User is redirected to the login (with the same message as normal message)

avatar bembelimen bembelimen - open - 16 Sep 2021
avatar bembelimen bembelimen - change - 16 Sep 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Sep 2021
Category Front End com_users
25b18a2 16 Sep 2021 avatar bembelimen CS
avatar bembelimen bembelimen - change - 16 Sep 2021
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 16 Sep 2021

Funny, I'll find the link in a moment, but when I reported this, I was told it was not an issue...

This is the wrong fix though. (Edit: This fix fixes the token not found in a better way, I agree with that, but it doesnt solve the root problem which is the GET request is validating the user)

A non-form-token'ed, GET request should not be allowed to validate a users account. An unauthenticated GET request performing anything other than data retrieval is fundamentally wrong. A GET request should not be updating a user entity's security credentials.

We would never allow this anywhere else. We would never allow a GET request to perform an action like this.

Moving the verification to a POST, with the user having to click the link to prefil a form, and then click a form submit button, as a POST is the correct fix for this root issue.

This PR fixes the symptoms and not the cause.

avatar PhilETaylor
PhilETaylor - comment - 16 Sep 2021

Also your screenshot shows this is an issue in Joomla 3 - yet this PR only addresses it in Joomla 4, it would need to be applied to Joomla 3 and then merged up to Joomla 4.

avatar bembelimen
bembelimen - comment - 16 Sep 2021

I see your point, but think the the "common user" expects to just click in the email link and that's it.

The Screenshot is from J! 4.

avatar PhilETaylor
PhilETaylor - comment - 17 Sep 2021

The "common user" expects Joomla to implement things securely, according to established security best practice and norms.

Regardless of the screenshot, if this is an issue in Joomla 3 also then it should be first addressed there.

avatar PhilETaylor PhilETaylor - test_item - 23 Sep 2021 - Tested successfully
avatar PhilETaylor
PhilETaylor - comment - 23 Sep 2021

I have tested this item successfully on 25b18a2

Marking this as successful as, as it handles the exception with a redirect as designed.

However, what seems to be out of scope of this PR, and is a security issue @joomla/security is the changing of a security credential (account validation) by GET request, which should be addressed, as nothing should change when making GET requests, which are designed for page retrieval and not updating a user object.


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

avatar PhilETaylor
PhilETaylor - comment - 18 Oct 2021

For the record this was reported to the Joomla security strike team, via their email address, however I did not receive any reply to my report to date

avatar jwaisner jwaisner - test_item - 13 Dec 2021 - Tested successfully
avatar jwaisner
jwaisner - comment - 13 Dec 2021

I have tested this item successfully on 25b18a2


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

avatar jwaisner jwaisner - change - 13 Dec 2021
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 13 Dec 2021

RTC


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

avatar bembelimen bembelimen - change - 21 Jan 2022
Labels Added: ?
avatar bembelimen bembelimen - change - 23 Jan 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-23 16:06:56
Closed_By bembelimen
Labels Added: ?
Removed: ?
avatar bembelimen bembelimen - close - 23 Jan 2022
avatar bembelimen bembelimen - merge - 23 Jan 2022
avatar PhilETaylor
PhilETaylor - comment - 2 Mar 2022

forked to #37172

Add a Comment

Login with GitHub to post a comment