500 Invalid key when creating issue in a project that contains a reserved word

If you create a project with a name that contains some reserved words, such as edit-foo or foo-edit, then try to create an issue, you will run into a 500 Invalid key.

Reserved words are anything in the PROJECT_WILDCARD_ROUTES list.

Seems like we shouldn't have the wildcard(.*) on both sides of the reserved words 🤔 so it only matches the exact reserved endpoints, https://gitlab.com/gitlab-org/gitlab-ce/blob/f7cbfe1d9133f1641b831695d646bc9b85de65bb/lib/gitlab/etag_caching/router.rb#L23

^(?!.*((?-mix:\\\-|badges|blame|blob|commits|create|create_dir|edit|environments\/folders|files|find_file|gitlab\\\-lfs\/objects|info\/lfs\/objects|preview|raw|refs|tree|update|wikis))).*\/issues\/\d+\/realtime_changes

This doesn't seem to happen when creating merge requests 🤷

This doesn't happen on GitLab.com which is production and doesn't raise the error.

Edited Jan 04, 2018 by Eric Eastwood
Assignee Loading
Time tracking Loading