No space trimming on Sentry URLs
Summary
No space trimming on entering Sentry URLs
Steps to reproduce
- Go to Application Settings
- Enter a URL for Sentry with a leading space
- Restart GitLab (as the instructions suggest)
- GitLab fails to start
What is the current bug behavior?
- GitLab fails to start due to a URL parse issue
I, [2018-07-25T16:36:50.489911 #32169] INFO -- : Refreshing Gem list
URI::InvalidURIError: bad URI(is not URI?): https://secret:secret@sentry.example.com/1
/opt/gitlab/embedded/lib/ruby/2.4.0/uri/rfc3986_parser.rb:67:in `split'
/opt/gitlab/embedded/lib/ruby/2.4.0/uri/rfc3986_parser.rb:73:in `parse'
/opt/gitlab/embedded/lib/ruby/2.4.0/uri/common.rb:231:in `parse'
/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/sentry-raven-2.7.2/lib/raven/configuration.rb:219:in `server='
What is the expected correct behavior?
One of:
- Reject user input due to invalid URL
- Trim input on save
- Trim value on startup