media assets: fix md5 leak in media assets.
Fix unprivileged users being able to see images and MD5 hashes of media assets belonging to censored posts.
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
|
||||
<%= table_for @media_assets, class: "striped autofit" do |t| %>
|
||||
<% t.column "File", td: { class: "text-center" } do |media_asset| %>
|
||||
<%= render MediaAssetPreviewComponent.new(media_asset: media_asset, save_data: CurrentUser.save_data, shrink_to_fit: false) %>
|
||||
<% if policy(media_asset).can_see_image? %>
|
||||
<%= render MediaAssetPreviewComponent.new(media_asset: media_asset, save_data: CurrentUser.save_data, shrink_to_fit: false) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% t.column :image_width %>
|
||||
|
||||
Reference in New Issue
Block a user