PyMISP icon indicating copy to clipboard operation
PyMISP copied to clipboard

Failed to create new Event

Open Panagiss opened this issue 4 years ago • 1 comments

I run the create_events.py script and i get this

/usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(
Something went wrong (403): {'saved': False, 'name': 'Could not add Event', 'message': 'Could not add Event', 'url': '/events/add', 'errors': {'Event': {'info': ['valueNotEmpty']}}}
{'errors': (403, {'saved': False, 'name': 'Could not add Event', 'message': 'Could not add Event', 'url': '/events/add', 'errors': {'Event': {'info': ['valueNotEmpty']}}})}

After the ssl warning is the problem i think but im not sure. I'm just testing it because there is not a lot of documentation about it. Thanks in advance

Panagiss avatar Aug 03 '21 19:08 Panagiss

Hello @Panagiss , The ssl warning can be addressed either changing the default certificate of your MISP instance to a a trusted one, adding the current one to your trust store or ignoring the warning as stated in the documentation provided in the warning message: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings.

The event creation failed, because you are missing the info property. Add the -i / --info argument with some value when calling the script.

{
  "saved": false,
  "name": "Could not add Event",
  "message": "Could not add Event",
  "url": "/events/add",
  "errors": {
    "Event": {
      "info": [
        "valueNotEmpty"
      ]
    }
  }
}

righel avatar Aug 04 '21 06:08 righel