diff options
author | Stan Hu <stanhu@gmail.com> | 2019-01-09 22:50:51 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-01-09 23:09:43 -0800 |
commit | 4ac4ba2654c9ffa6065e6d4789c279d676c5971b (patch) | |
tree | a12e4e42f65bd2e62486b066373e37e93377fd93 /app/controllers/admin | |
parent | 4a6c7661edae664a7f6366201d017e24d8f42026 (diff) | |
download | gitlab-ce-4ac4ba2654c9ffa6065e6d4789c279d676c5971b.tar.gz |
Fix requests profiler in admin page not rendering HTML properly
By default in Rails 5, content passed to `render` will be
escaped. This doesn't work for the HTML profile output, which
should be considered safe HTML already.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56152
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/requests_profiles_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/requests_profiles_controller.rb b/app/controllers/admin/requests_profiles_controller.rb index 57f7d3e3951..89d4c4f18d9 100644 --- a/app/controllers/admin/requests_profiles_controller.rb +++ b/app/controllers/admin/requests_profiles_controller.rb @@ -11,7 +11,7 @@ class Admin::RequestsProfilesController < Admin::ApplicationController profile = Gitlab::RequestProfiler::Profile.find(clean_name) if profile - render html: profile.content + render html: profile.content.html_safe else redirect_to admin_requests_profiles_path, alert: 'Profile not found' end |