API crashes for some regex queries
Created by: hermannsblum
For the following query, the API crashes:
curl "https://api-dev.amiv.ethz.ch/events?where=\{\"\$or\":\[\{\"_id\":\"5b043d6c872eae0001b459d8\"\},\{\"title_de\":\{\"\$regex\":\"5b043d6c872eae0001b459d8\"\}\}\]\}"
If not using regex, it works:
curl "https://api-dev.amiv.ethz.ch/events?where=\{\"\$or\":\[\{\"_id\":\"5b043d6c872eae0001b459d8\"\},\{\"title_de\":\"5b043d6c872eae0001b459d8\"\}\]\}"
It also works with a regex, if the regex does not equal the id:
curl "https://api-dev.amiv.ethz.ch/events?where=\{\"\$or\":\[\{\"_id\":\"5b043d6c872eae0001b459d8\"\},\{\"title_de\":\{\"\$regex\":\"5b043d6c872eae0001b459d\"\}\}\]\}" (last character of id removed)