diff options
| author | winniehell <git@winniehell.de> | 2016-07-07 14:28:28 +0200 |
|---|---|---|
| committer | winniehell <git@winniehell.de> | 2016-07-07 14:49:04 +0200 |
| commit | cd63d0a53844507fe7bbf0fabeb89dadecf85fe7 (patch) | |
| tree | 2a500eb6ba6dea9fbd66f37f11f2a93ee0992932 | |
| parent | 3c89a788c795fba2b050a0af0d8261e302d8cded (diff) | |
| download | gitlab-ce-cd63d0a53844507fe7bbf0fabeb89dadecf85fe7.tar.gz | |
Escape file extension when parsing search results (!5141)
| -rw-r--r-- | CHANGELOG | 1 | ||||
| -rw-r--r-- | app/models/repository.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index bc9bb7747a4..7643193451d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v 8.10.0 (unreleased) - Wrap code blocks on Activies and Todos page. !4783 (winniehell) - Align flash messages with left side of page content !4959 (winniehell) - Display last commit of deleted branch in push events !4699 (winniehell) + - Escape file extension when parsing search results !5141 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack - Add Sidekiq queue duration to transaction metrics. - Add a new column `artifacts_size` to table `ci_builds` !4964 diff --git a/app/models/repository.rb b/app/models/repository.rb index 078ca8f4e13..d232d422195 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -911,7 +911,7 @@ class Repository if line =~ /^.*:.*:\d+:/ ref, filename, startline = line.split(':') startline = startline.to_i - index - extname = File.extname(filename) + extname = Regexp.escape(File.extname(filename)) basename = filename.sub(/#{extname}$/, '') break end |
