Mask password in import URL while importing.

This commit is contained in:
uran 2014-08-26 10:11:11 +03:00
parent 23d4fcbd2c
commit e9015dfbc9
2 changed files with 7 additions and 1 deletions

View file

@ -261,4 +261,10 @@ module ProjectsHelper
project_blob_path(project, tree_join(project.default_branch, project.repository.contribution_guide.name))
end
end
def hidden_pass_url(original_url)
result = URI(original_url)
result.password = '*****' if result.password.present?
result
end
end

View file

@ -4,7 +4,7 @@
%h2
%i.icon-spinner.icon-spin
Import in progress.
%p.monospace git clone --bare #{@project.import_url}
%p.monospace git clone --bare #{hidden_pass_url(@project.import_url)}
%p Please wait while we import the repository for you. Refresh at will.
:javascript
new ProjectImport();