Merge branch 'fix/mediaproxy-bypass-emoji' into 'develop'
Fix profile emojis bypassing mediaproxy and harden CSP Closes #1810 See merge request pleroma/pleroma!2596
This commit is contained in:
commit
396bc69aee
5 changed files with 106 additions and 43 deletions
|
|
@ -182,12 +182,14 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
bot = user.actor_type in ["Application", "Service"]
|
||||
|
||||
emojis =
|
||||
Enum.map(user.emoji, fn {shortcode, url} ->
|
||||
Enum.map(user.emoji, fn {shortcode, raw_url} ->
|
||||
url = MediaProxy.url(raw_url)
|
||||
|
||||
%{
|
||||
"shortcode" => shortcode,
|
||||
"url" => url,
|
||||
"static_url" => url,
|
||||
"visible_in_picker" => false
|
||||
shortcode: shortcode,
|
||||
url: url,
|
||||
static_url: url,
|
||||
visible_in_picker: false
|
||||
}
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue