New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch mailmotor spamming errors #2670

merged 2 commits into from Dec 19, 2018


None yet
3 participants
Copy link

carakas commented Oct 31, 2018


  • Non critical bugfix

Pull request description

When spammers fill in the mailmotor subscribe they can trigger the following error:

{"type":"","title":"Invalid Resource","status":400,"detail":" has signed up to a lot of lists very recently; we're not allowing more signups for now","instance":"xxxxxxxxx"}

this will catch it and keep spammers from messing up your error log

@carakas carakas added this to the 5.4.2 milestone Oct 31, 2018

@carakas carakas requested a review from forkcms/core-contributors Oct 31, 2018

throw $exception;
$this->template->assign('mailmotorSubscribeHasFormError', true);

This comment has been minimized.


tijsverkoyen Oct 31, 2018


Wouldn't it be better to have a separate error in the template for Mailchimp specific errors? And also passing the reason to it?

This comment has been minimized.


carakas Nov 5, 2018

Author Member

We could, but this would work in all custom themes as well without modification.
Apart from that, I think it is a little bit dangerous to just parse the errors from MailChimp since I just get a bad request back, but you never know what info will be included. On top of that are the returned errors in English, so on a site in a different language you would get multiple languages on a page with no proper way of translating it

This comment has been minimized.


tijsverkoyen Nov 5, 2018


maybe log the error into a error log, because with your fix you will never know what the error was.

@carakas carakas force-pushed the justcarakas:mailmotor-spam-errors branch from 8ab271f to e2be86d Dec 18, 2018

@carakas carakas merged commit 0de560c into forkcms:master Dec 19, 2018

2 checks passed

Scrutinizer 1 new issues, 1 updated code elements
continuous-integration/travis-ci/pr The Travis CI build passed

@carakas carakas deleted the justcarakas:mailmotor-spam-errors branch Dec 19, 2018

@carakas carakas modified the milestones: 5.4.2, 5.5.0 Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment