diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-07-05 17:01:38 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-07-05 19:10:14 +0100 |
commit | 1207d451ed934f3ce2d8c02130a8e6b2cac88a70 (patch) | |
tree | 35f501038ecc6cde3927666d4011d0fb03f9b771 /lib | |
parent | d1e0b1b3a8404f3a7b54db09c46fb614ca3fcb93 (diff) | |
download | gitlab-ce-1207d451ed934f3ce2d8c02130a8e6b2cac88a70.tar.gz |
Removes file_name_regex from Gitlab::Regex32408-allow-creation-of-files-and-dirs-with-spaces-in-web-ui
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/index.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/regex.rb | 8 |
2 files changed, 0 insertions, 12 deletions
diff --git a/lib/gitlab/git/index.rb b/lib/gitlab/git/index.rb index 1add037fa5f..666743006e5 100644 --- a/lib/gitlab/git/index.rb +++ b/lib/gitlab/git/index.rb @@ -110,10 +110,6 @@ module Gitlab if segment == '..' raise IndexError, 'Path cannot include directory traversal' end - - unless segment =~ Gitlab::Regex.file_name_regex - raise IndexError, "Path #{Gitlab::Regex.file_name_regex_message}" - end end pathname.to_s diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index a5bd2175921..057f32eaef7 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -19,14 +19,6 @@ module Gitlab "It must start with letter, digit, emoji or '_'." end - def file_name_regex - @file_name_regex ||= /\A[^\/\0]*\z/.freeze - end - - def file_name_regex_message - "can contain only letters, digits, '_', '-', '@', '+' and '.'." - end - def container_registry_reference_regex Gitlab::PathRegex.git_reference_regex end |