Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-12 14:28:48 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-12 14:28:48 +0300
commit118bd7178b2be5f8a8fbcfa6af66e9e6d299b658 (patch)
treefdfd569d8447134f7f9d5b427f160e7fbf2d23f3 /app/controllers/snippets_controller.rb
parentf28a12a559ef5492b583f0ae5dff5dcb49c7afe1 (diff)
Sanitize snippet file name in raw headers
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r--app/controllers/snippets_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index bf3312fedc8..312e561b522 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -79,7 +79,7 @@ class SnippetsController < ApplicationController
@snippet.content,
type: 'text/plain; charset=utf-8',
disposition: 'inline',
- filename: @snippet.file_name
+ filename: @snippet.sanitized_file_name
)
end