Fix #49272 - Sanitize git URL in import errors
This commit is contained in:
parent
25af7197ba
commit
d32802c76b
|
@ -23,7 +23,7 @@ module Projects
|
|||
|
||||
success
|
||||
rescue => e
|
||||
error("Error importing repository #{project.import_url} into #{project.full_path} - #{e.message}")
|
||||
error("Error importing repository #{project.safe_import_url} into #{project.full_path} - #{e.message}")
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Sanitize git URL in import errors
|
||||
merge_request:
|
||||
author: Jamie Schembri
|
||||
type: fixed
|
|
@ -69,7 +69,7 @@ describe Projects::ImportService do
|
|||
result = subject.execute
|
||||
|
||||
expect(result[:status]).to eq :error
|
||||
expect(result[:message]).to eq "Error importing repository #{project.import_url} into #{project.full_path} - The repository could not be created."
|
||||
expect(result[:message]).to eq "Error importing repository #{project.safe_import_url} into #{project.full_path} - The repository could not be created."
|
||||
end
|
||||
|
||||
context 'when repository creation succeeds' do
|
||||
|
@ -141,7 +141,7 @@ describe Projects::ImportService do
|
|||
result = subject.execute
|
||||
|
||||
expect(result[:status]).to eq :error
|
||||
expect(result[:message]).to eq "Error importing repository #{project.import_url} into #{project.full_path} - Failed to import the repository"
|
||||
expect(result[:message]).to eq "Error importing repository #{project.safe_import_url} into #{project.full_path} - Failed to import the repository"
|
||||
end
|
||||
|
||||
context 'when repository import scheduled' do
|
||||
|
|
Loading…
Reference in New Issue