Page MenuHomePhabricator

Wikimedia Foundation nomail list is not honored correctly by makeMailingList.php
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Emails are sent even if the username appears on the nomail list.

What should have happened instead?:
All users on that list should not receive emails. They should be filtered out by running makeMailingList.php.

I am wondering if the nomail list needs to be formatted a certain way, and it may just be silently failing.

Event Timeline

Do you have any specific examples (even if in private)?

Was it everyone? Only a couple of users?

For example, the regex (/(?<=<pre>).*(?=<\/pre>)/s) against the page, very superficially suggests no matches... https://regex101.com/r/XKG7wY/1

The <pre>/</pre> tags have been removed at some point... Which will explain it not working!

Change #1071631 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/SecurePoll@master] makeMailingList: Check we get some users on the nomail list

https://gerrit.wikimedia.org/r/1071631

D'oh! That would do it.

Maybe the script should still be tweaked to look for something that's not the <pre> tag anyway?

In any case I wrote a small Python script that fully removes those folks from the mailing list I have at the moment (the nomail list check is done in the compilation of that list, so these improvements wouldn't impact this cycle anyways)

Maybe the script should still be tweaked to look for something that's not the <pre> tag anyway?

It's a little hard to know what is a username or not otherwise based on how the list is currently; Is {{Process header etc? We don't have * prefixes, for example like we do in other places.

Change #1071631 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/SecurePoll@master] makeMailingList: Check we get some users on the nomail list

https://gerrit.wikimedia.org/r/1071631

^ Primarily, that is what this does though.

If we don't get any results from loading https://meta.wikimedia.org/wiki/Wikimedia_Foundation_nomail_list, that's almost certainly going to be an error based on the current implementation (the page name isn't variable etc), and it will abort at that point, and not (finish) making said list (arguably, if it's going to fail, it's going to fail very early, after the first user it finds that has a confirmed email... And if they have no email set, they're not going to have been written to the list to be emailed anyway)... With a fairly visible error.

Change #1071631 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] makeMailingList: Check we get some users on the nomail list

https://gerrit.wikimedia.org/r/1071631

Reedy claimed this task.