Hi.
The phpdoc of PrefsEmailAuditHook describes the return value can abort the changing, but actually it can't.
Therefore, extensions cannot prevent users from changing their emails. More specially, there is an open task for Extension:SpamBlacklist. [1] Users can easily bypass the email blacklist, and it really bothers me on a wiki where I act as a bureaucrat.
So Uploaded a patch for this and a patch for SpamBlacklist in May. And now I've realized I didn't promote my patches enough.
If you are interested, please help me by giving a comment or reviewing my patches.
Regards.
The isValidEmailAddr hook [1] can be used to reject email addresses, so that could be useful for SpamBlacklist. Note that the leading character in the hook name is lowercase.
[1] https://www.mediawiki.org/wiki/Manual:Hooks/isValidEmailAddr
-----Original Message----- From: lens0021 lens0021 lorentz0021@gmail.com Sent: Tuesday, September 24, 2024 7:46 AM To: wikitech-l@lists.wikimedia.org Subject: [Wikitech-l] Need an alternative to PrefsEmailAuditHook
Hi.
The phpdoc of PrefsEmailAuditHook describes the return value can abort the changing, but actually it can't.
Therefore, extensions cannot prevent users from changing their emails. More specially, there is an open task for Extension:SpamBlacklist. [1] Users can easily bypass the email blacklist, and it really bothers me on a wiki where I act as a bureaucrat.
So Uploaded a patch for this and a patch for SpamBlacklist in May. And now I've realized I didn't promote my patches enough.
If you are interested, please help me by giving a comment or reviewing my patches.
Regards.
1: https://phabricator.wikimedia.org/T315128 _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Thank you for responding.
isValidEmailAddr is what I'm using currently. [1] But using the hook (1) does not show helpful message to user, It just says “your email address is not confirmed” for some reason. (2) The hook is invoked too many times than I expected, for example it happens whenever a user open an editing page.
But thank you again.
1: https://github.com/femiwiki/UnifiedExtensionForFemiwiki/blob/7ba08a3bd8a2f56...
wikitech-l@lists.wikimedia.org