Fix #4385: Prevent custom CSS softlocks.

Use e.g. https://danbooru.donmai.us/settings?css=false to view a page
with custom css disabled.
This commit is contained in:
evazion
2020-04-03 21:18:15 -05:00
parent d435795b73
commit 650c5b779e

View File

@@ -23,7 +23,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<%= 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 %>