[7.6] Dot in username or project name makes Project not found via API
Created by: vemod
*Summary: *
Get Project details via API (http://doc.gitlab.com/ee/api/projects.html) returns {"message":"404 Not Found"}
if username or project name has a "." (dot) in it.
*Steps to reproduce: *
- Add dot into username OR add dot to project name.
- Make API call to get project details
Observed behavior
-
Good Request
curl "http://127.0.0.1:9292/api/v3/projects/testusername%2ftest-project/?private_token=MY_TOKEN"
{"id":11,"description":"","default_branch":null...}
-
Bad Request
curl "http://127.0.0.1:9292/api/v3/projects/test.username%2ftest-project/?private_token=MY_TOKEN"
{"message":"404 Not Found"}
curl "http://127.0.0.1:9292/api/v3/projects/testusername%2ftest.project/?private_token=MY_TOKEN"
{"message":"404 Not Found"}
Expected behavior: Dot is a natural delimiter in user names especially when they get generated from LDAP Emails. So "." should not have same effect like "-" (no effect).
Version info
bundle exec rake gitlab:env:info RAILS_ENV=production
System information
Using RVM: yes
RVM Version: 1.25.28
Ruby Version: 2.1.3p242
Gem Version: 2.2.2
Bundler Version:1.7.3
Rake Version: 10.3.2
Sidekiq Version:2.17.8
GitLab information
Version: 7.6.2
Revision: 43180c6
Directory: /home/git/gitlab
DB Adapter: mysql2
GitLab Shell
Version: 2.4.0