diff options
author | Stan Hu <stanhu@gmail.com> | 2016-05-03 21:32:49 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-05-04 14:06:07 -0700 |
commit | 75523d1df91cc871847a00cad4e5e1d44278a647 (patch) | |
tree | 47479fc70996c167438f89795d3d7353c66782e4 /app/helpers/projects_helper.rb | |
parent | 8be1118aa528dff6787fdab7fbde7261a012c418 (diff) | |
download | gitlab-ce-75523d1df91cc871847a00cad4e5e1d44278a647.tar.gz |
Sanitize repo paths in new project error message
Closes #17243
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 3d5e61d2c18..3720b0085e5 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -341,4 +341,10 @@ module ProjectsHelper ) end end + + def sanitize_repo_path(message) + return '' unless message.present? + + message.strip.gsub(Gitlab.config.gitlab_shell.repos_path.chomp('/'), "[REPOS PATH]") + end end |