Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:08:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:08:15 +0300
commitc2b98d3dbd47ab92c79c702276fe9130d9a28036 (patch)
treebf4071f551fdc12c22b23b2bb66483064e7b9ea9 /app/models/remote_mirror.rb
parentbadb9c1deacbea601b02f88811b7e123589d9251 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/remote_mirror.rb')
-rw-r--r--app/models/remote_mirror.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb
index c165a1a9b0d..1e5c93cd913 100644
--- a/app/models/remote_mirror.rb
+++ b/app/models/remote_mirror.rb
@@ -3,6 +3,7 @@
class RemoteMirror < ApplicationRecord
include AfterCommitQueue
include MirrorAuthentication
+ include SafeUrl
MAX_FIRST_RUNTIME = 3.hours
MAX_INCREMENTAL_RUNTIME = 1.hour
@@ -194,13 +195,7 @@ class RemoteMirror < ApplicationRecord
end
def safe_url
- return if url.nil?
-
- result = URI.parse(url)
- result.password = '*****' if result.password
- result.user = '*****' if result.user && result.user != 'git' # tokens or other data may be saved as user
- result.to_s
- rescue URI::Error
+ super(usernames_whitelist: %w[git])
end
def ensure_remote!