Skip to content

Commit

Permalink
SECURITY: mini profiler enabled incorrectly for admins
Browse files Browse the repository at this point in the history
We expect mini profiler only to show up on accounts that are flagged as
developer accounts.

Unfortunately there was a bypass on any controllers that mix in ApplicationHelper
  • Loading branch information
SamSaffron committed Oct 9, 2019
1 parent 49a4b0d commit 602215a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/helpers/application_helper.rb
Expand Up @@ -185,10 +185,6 @@ def guardian
@guardian ||= Guardian.new(current_user)
end

def mini_profiler_enabled?
defined?(Rack::MiniProfiler) && admin?
end

def admin?
current_user.try(:admin?)
end
Expand Down

0 comments on commit 602215a

Please sign in to comment.