Indico spamming like crazy

I’m making a fresh install of indico to migrate our 1.2 installation to. I’ve followed the instructions here: https://docs.getindico.io/en/stable/installation/production/centos/nginx/. Part of this was “pip install indico” which I assume installs 2.0.3 (I have a separate item about how to verify that). This is configured, but has no active data in it yet.

It has been installed since Friday, but today we suddenly had around 500 emails containing this traceback:

Traceback (most recent call last):
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/flask/util.py", line 114, in wrapper
    return obj().process()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 270, in process
    res = self._do_process()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 249, in _do_process
    return self._process()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/blueprint.py", line 50, in _process
    _send_email(form.with_event.data)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/blueprint.py", line 39, in _send_email
    _notify_registration(Registration.get(56757), 'registration_creation_to_registrant.html')
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/modules/events/registration/notifications.py", line 41, in _notify_registration
    regform = registration.registration_form
AttributeError: 'NoneType' object has no attribute 'registration_form'

This happened after I’d told our security people that it was only if they wanted to scan it, so my guess is that this was triggered by them, rather than by real use. but in any case I think a test for a null value is needed here.

Can you provide us with the full details from the error email? Especially the requested URL.

The url is https://indicodev.tec.estec.esa.int/test/
Invoking that manually and then clicking the save button also generates a traceback email.

Here is the rest of the email, which was below the traceback:

{u'data': {u'get': {},
           u'headers': {'Accept': u'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*',
                        'Accept-Charset': u'iso-8859-1,utf-8;q=0.9,*;q=0.1',
                        'Accept-Language': u'en',
                        'Connection': u'Keep-Alive',
                        'Content-Length': u'58',
                        'Content-Type': u'application/x-www-form-urlencoded',
                        'Host': u'indicodev.tec.estec.esa.int',
                        'Pragma': u'no-cache',
                        'User-Agent': u'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)'},
           u'json': None,
           u'post': {'check': u'y',
                     'check2': u'y',
                     'check3': u'y',
                     'check4': u'y',
                     'text': u';id',
                     'with_event': u'y'},
           u'url': {}},
 u'endpoint': u'test.test',
 u'id': '08bc8696230b4f8d',
 u'ip': '10.178.5.101',
 u'method': 'POST',
 u'referrer': None,
 u'rh': 'RHTest',
 u'time': '2018-04-16T12:15:18.199781',
 u'url': u'https://indicodev.tec.estec.esa.int/test/',
 u'user': None,
 u'user_agent': u'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)'}

Ooops, looks like somehow one of my old test scripts used during develppment ended up in the release build. Luckily it’s completely harmless - it was just used for some testing related to error handling.

Delete these files to get rid of it:

  • /opt/indico/.venv/lib/python2.7/site-packages/indico/web/blueprint.py
  • /opt/indico/.venv/lib/python2.7/site-packages/indico/web/blueprint.pyc

Then reload/restart uwsgi.

Page doesn’t exist now. so problem solved. thanks - chris