From cce0dd7526f77dbfaf322b1ba92056ffb3379166 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 21 Jun 2021 16:49:24 +0300 Subject: [PATCH] Check token instance images MIME types --- CHANGELOG.md | 1 + apps/block_scout_web/.sobelow-conf | 5 +- .../instance/overview/_details.html.eex | 4 +- .../tokens/inventory/_token.html.eex | 2 +- .../views/tokens/instance/overview_view.ex | 46 +++++++++++++++++-- apps/block_scout_web/mix.exs | 1 + apps/block_scout_web/priv/gettext/default.pot | 4 +- .../priv/gettext/en/LC_MESSAGES/default.po | 4 +- docker/Dockerfile | 2 +- mix.lock | 2 + 10 files changed, 59 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bea0f0c6e..d06b487f5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Fixes - [#4307](https://github.com/blockscout/blockscout/pull/4307) - Fix for composing IPFS URLs for NFTs images +- [#4306](https://github.com/blockscout/blockscout/pull/4306) - Check token instance images MIME types - [#4295](https://github.com/blockscout/blockscout/pull/4295) - Mobile view fix: transaction tile tx hash overflow - [#4294](https://github.com/blockscout/blockscout/pull/4294) - User wont be able to open verification pages for verified smart-contract - [#4240](https://github.com/blockscout/blockscout/pull/4240) - `[]` is accepted in write contract page diff --git a/apps/block_scout_web/.sobelow-conf b/apps/block_scout_web/.sobelow-conf index c25a16136d..99d6ca9eeb 100644 --- a/apps/block_scout_web/.sobelow-conf +++ b/apps/block_scout_web/.sobelow-conf @@ -5,5 +5,8 @@ router: "lib/block_scout_web/router.ex", exit: "low", format: "compact", - ignore: ["Config.Headers", "Config.CSWH", "XSS.SendResp", "XSS.Raw"] + ignore: ["Config.Headers", "Config.CSWH", "XSS.SendResp", "XSS.Raw"], + ignore_files: [ + "apps/block_scout_web/lib/block_scout_web/views/tokens/instance/overview_view.ex" + ] ] diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex index 67b86cf05c..152a277753 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex @@ -61,8 +61,8 @@
- <%= if media_type(media_src(@token_instance.instance)) == "mp4" do %> -