Last modified: 2013-03-28 22:55:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48655, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46655 - ConfirmEmailComplete fires again if you confirm an already-confirmed email
ConfirmEmailComplete fires again if you confirm an already-confirmed email
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.21.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-28 20:49 UTC by Matthew Flaschen
Modified: 2013-03-28 22:55 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-03-28 20:49:24 UTC
None of Special:ConfirmEmail, User::newFromConfirmationCode, and User::confirmEmail check if an email is already confirmed.  newFromConfirmationCode just checks if it's a valid non-expired code, but using a code does not expire it.

It's fine not to show an error for double confirmations, but the hook should not fire twice.  I don't think setEmailAuthenticationTimestamp should be called again either, so my patch will avoid doing so.
Comment 1 Matthew Flaschen 2013-03-28 22:45:25 UTC
Proposed fix at https://gerrit.wikimedia.org/r/56539

It calls isEmailConfirmed to see if they're already confirmed.  If so, it returns true without doing anything.

This does mean the EmailConfirmed hook (called by isEmailConfirmed) will be called in an additional scenario.  However, isEmailConfirmed seems to be called frequently already (e.g. by both canSendEmail and canReceiveEmail).

The fix means you can do something user-facing (e.g. sending an email to the user) on ConfirmEmailComplete without that occurring twice if the URL is visited again when they're already confirmed.
Comment 2 Matthew Flaschen 2013-03-28 22:55:42 UTC
Merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links