URL Encoding - Import
Overview
URL's that contain non-ASCII characters fail to import and must be manually URL encoded,
Reproduce
- Create a new project
- Import from git repo
- Use a password or username with non-ASCII chars (& #) - e.g
https://test:myLongpass#p/M&87@gitlab.com/test/test-import-only.git
Expected
non-ASCII chars are automatically encoded and the repository is imported
Actual
500 internal error is displayed
Trace
Unable to save project. Error: Invalid port number: "myLongpass"
Completed 500 Internal Server Error in 86ms (ActiveRecord: 0.7ms)
NoMethodError (undefined method `saved?' for nil:NilClass):
app/controllers/projects_controller.rb:30:in `create'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/middleware/readonly_geo.rb:29:in `call'
cc// @jameslopez
Related: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4753