diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-04 16:12:47 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-04 16:12:47 +0000 |
commit | ac923b4fb40da88d6c7907d08d4584d5d4a560e2 (patch) | |
tree | 79050d2d630b681d1ed97448e497be87c4905328 /lib | |
parent | dfe12649f64bcac76b270a96be04285bbe0c2aa2 (diff) | |
parent | 5dc77d7577bf19586f6cd756678d0c2660e7f868 (diff) | |
download | gitlab-ce-ac923b4fb40da88d6c7907d08d4584d5d4a560e2.tar.gz |
Merge branch 'fix/atom-url-issue' into 'master'
Fix atom url issue on projects
This MR adds prevents a project to have a path ending in .atom that conflicts with the feed
and
Adds a migration to migrate old .atom projects to a different path
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3699
See merge request !2651
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/backend/shell.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/regex.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb index 4c15d58d680..f751458ac66 100644 --- a/lib/gitlab/backend/shell.rb +++ b/lib/gitlab/backend/shell.rb @@ -47,7 +47,7 @@ module Gitlab # new_path - new project path with namespace # # Ex. - # mv_repository("gitlab/gitlab-ci", "randx/gitlab-ci-new.git") + # mv_repository("gitlab/gitlab-ci", "randx/gitlab-ci-new") # def mv_repository(path, new_path) Gitlab::Utils.system_silent([gitlab_shell_projects_path, 'mv-project', diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 5c35c5b1450..ace906a6f59 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -34,12 +34,12 @@ module Gitlab def project_path_regex - @project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git)\z/.freeze + @project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git|\.atom)\z/.freeze end def project_path_regex_message "can contain only letters, digits, '_', '-' and '.'. " \ - "Cannot start with '-' or end in '.git'" \ + "Cannot start with '-', end in '.git' or end in '.atom'" \ end |