Project search API endpoint crashes on special character searches

Summary

The project search API endpoint (/search?scope=project) does not handle certain special characters very well, leading to server (timeout?) errors.

Steps to reproduce

Make an authenticated API request:

https://gitlab.com/api/v4/search?scope=projects&search=ß😃☀♴&per_page=1&pages=1

Or just hit this to get a 500 on gitlab.com:

https://gitlab.com/search?utf8=✓&snippets=&scope=&search=ß😃☀♴

Example Project

Not applicable. Happens on gitlab.com

What is the current bug behavior?

Crash / hang.

What is the expected correct behavior?

Most likely an empty 200 result [].

Relevant logs and/or screenshots

No logs returned. Typically 502, 500, or timeout response.

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited Mar 30, 2018 by Richard Bresnan
Assignee Loading
Time tracking Loading