Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f7fd36f2
Commit
f7fd36f2
authored
Sep 29, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to the latest addressable behaviour
parent
cffc28ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
lib/gitlab/url_sanitizer.rb
lib/gitlab/url_sanitizer.rb
+0
-2
spec/lib/gitlab/url_sanitizer_spec.rb
spec/lib/gitlab/url_sanitizer_spec.rb
+2
-2
No files found.
lib/gitlab/url_sanitizer.rb
View file @
f7fd36f2
...
...
@@ -64,8 +64,6 @@ module Gitlab
url
.
password
=
password
if
password
.
present?
url
.
user
=
user
if
user
.
present?
url
rescue
Addressable
::
URI
::
InvalidURIError
Addressable
::
URI
.
new
end
def
generate_full_url
...
...
spec/lib/gitlab/url_sanitizer_spec.rb
View file @
f7fd36f2
...
...
@@ -39,7 +39,8 @@ describe Gitlab::UrlSanitizer do
false
|
nil
false
|
''
false
|
'123://invalid:url'
true
|
'valid@project:url.git'
false
|
'valid@project:url.git'
true
|
'valid:pass@project:url.git'
true
|
'ssh://example.com'
true
|
'ssh://:@example.com'
true
|
'ssh://foo@example.com'
...
...
@@ -117,7 +118,6 @@ describe Gitlab::UrlSanitizer do
'http://example.com'
|
{
user:
nil
,
password:
nil
}
# Credentials from SCP-style URLs are not supported at present
'foo@example.com:path'
|
{
user:
nil
,
password:
nil
}
'foo:bar@example.com:path'
|
{
user:
nil
,
password:
nil
}
# Other invalid URLs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment