422 error while trying to access settings/edit page for some imported projects
When I try to access the settings/edit page for some imported projects I receive this:
The change you requested was rejected.
And on Sentry I have:
ActionView::Template::Error: Validation failed: Import url must be a valid URL errorapp/models/concerns/token_authenticatable.rb in block in add_authentication_token_field at line 31 ActiveRecord::RecordInvalid: Validation failed: Import url must be a valid URL app/models/concerns/token_authenticatable.rb in block in add_authentication_token_field at line 31
Full RAW here: https://gitlab.com/snippets/16618
GitLab CE 8.5.7
Edit: I was thinking this issue was affecting all archived projects, but it's not, some archived projects on my installation does not show this error.
Edit 2 + workaround: I had to manually delete the contents of
projects.import_url from the database, it's working fine now.
The URL was something like
https://myusername:email@example.com/group/project.git. I removed all 0-9 a-z A-Z chars from my previous password, and preserved only the original special chars since this can be the root cause. Also, this was really a Bitbucket project.