From 650c5b779e01931c87e588551fe24b3018d2158f Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 3 Apr 2020 21:18:15 -0500 Subject: [PATCH] Fix #4385: Prevent custom CSS softlocks. Use e.g. https://danbooru.donmai.us/settings?css=false to view a page with custom css disabled. --- app/views/layouts/default.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index b2b4dc447..34c1d7a7a 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -23,7 +23,7 @@ <%= javascript_pack_tag "application" %> <%= stylesheet_pack_tag "application" %> - <% if CurrentUser.user.custom_style.present? %> + <% if CurrentUser.user.custom_style.present? && params.fetch(:css, "true").truthy? %> <%= stylesheet_link_tag custom_style_users_path(md5: Digest::MD5.hexdigest(CurrentUser.user.custom_style)), media: "screen" %> <% end %> <% if Danbooru.config.twitter_site %>