summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorTakuya Noguchi <takninnovationresearch@gmail.com>2017-11-11 00:02:42 +0900
committerTakuya Noguchi <takninnovationresearch@gmail.com>2018-01-25 08:12:19 +0900
commitbb9b7bf6e33ae68d1f898c4cd5e09b44bee2be80 (patch)
tree17d856aa785b3d8b8a0252623b9b793f0f5084bb /config
parent44728e0527bc7c5cf982be2fbbd26e24a79e5d8f (diff)
downloadgitlab-ce-bb9b7bf6e33ae68d1f898c4cd5e09b44bee2be80.tar.gz
Handle special characters on API request of issuable templates
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 43ada9ba145..0496bd85b4e 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -40,7 +40,7 @@ constraints(ProjectUrlConstrainer.new) do
#
# Templates
#
- get '/templates/:template_type/:key' => 'templates#show', as: :template
+ get '/templates/:template_type/:key' => 'templates#show', as: :template, constraints: { key: /[^\/]+/ }
resource :avatar, only: [:show, :destroy]
resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do