Commit 07fa43bd authored by Robert Speicher's avatar Robert Speicher

Merge branch 'support-forum_816' into 'master'

Don't expose repository credentials when raising error on mirror update.

REF: https://gitlab.com/gitlab-com/support-forum/issues/816

See merge request !527
parents 06154624 1a2610d2
...@@ -27,7 +27,7 @@ class RepositoryUpdateMirrorWorker ...@@ -27,7 +27,7 @@ class RepositoryUpdateMirrorWorker
rescue => ex rescue => ex
project.mark_import_as_failed("We're sorry, a temporary error occurred, please try again.") project.mark_import_as_failed("We're sorry, a temporary error occurred, please try again.")
raise UpdateMirrorError, "#{ex.class}: #{ex.message}" raise UpdateMirrorError, "#{ex.class}: #{Gitlab::UrlSanitizer.sanitize(ex.message)}"
end end
end end
......
...@@ -21,7 +21,7 @@ class RepositoryUpdateRemoteMirrorWorker ...@@ -21,7 +21,7 @@ class RepositoryUpdateRemoteMirrorWorker
rescue => ex rescue => ex
remote_mirror.mark_as_failed("We're sorry, a temporary error occurred, please try again.") remote_mirror.mark_as_failed("We're sorry, a temporary error occurred, please try again.")
raise UpdateRemoteMirrorError, "#{ex.class}: #{ex.message}" raise UpdateRemoteMirrorError, "#{ex.class}: #{Gitlab::UrlSanitizer.sanitize(ex.message)}"
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment