Bogus accounts in patchwork

Jeremy Kerr jk at ozlabs.org
Thu Apr 24 11:33:52 EST 2014


Hi Carl,

> It looks like the cron job cleaned up "Auth > Users" and the
> "Patchwork > User Profiles" lists just fine.
> 
> But I still seem to have thousands of junk entries in the
> "Patchwork > People" list, (and many are not email address seen in patch
> emails---I have lots of true garbage entries such as:
> nirsoiutbiycEQ nirsoiutuaplEQ <awackixiu at hotmail.com>).

As of current master, we no longer create the People until the
registration is confirmed. So, we can do this as a once-off instead of
in the cron job.

I'll get this done as a sql migration script; current testing shows that
this would suit:

BEGIN;
DELETE FROM patchwork_person WHERE id NOT IN (
	SELECT submitter_id FROM patchwork_patch
	UNION
	SELECT submitter_id FROM patchwork_comment);
ROLLBACK;

- if you're feeling brave, you can just run that directly through your
DB client, changing ROLLBACK to COMMIT.

Cheers,


Jeremy


More information about the Patchwork mailing list