This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec
Martin Brennan dede942007
FEATURE: Allow email image embed with secure media (#10563)
This PR introduces a few important changes to secure media redaction in emails. First of all, two new site settings have been introduced:

* `secure_media_allow_embed_images_in_emails`: If enabled we will embed secure images in emails instead of redacting them.
* `secure_media_max_email_embed_image_size_kb`: The cap to the size of the secure image we will embed, defaulting to 1mb, so the email does not become too big. Max is 10mb. Works in tandem with `email_total_attachment_size_limit_kb`.

`Email::Sender` will now attach images to the email based on these settings. The sender will also call `inline_secure_images` in `Email::Styles` after secure media is redacted and attachments are added to replace redaction messages with attached images. I went with attachment and `cid` URLs because base64 image support is _still_ flaky in email clients.

All redaction of secure media is now handled in `Email::Styles` and calls out to `PrettyText.strip_secure_media` to do the actual stripping and replacing with placeholders. `app/mailers/group_smtp_mailer.rb` and `app/mailers/user_notifications.rb` no longer do any stripping because they are earlier in the pipeline than `Email::Styles`.

Finally the redaction notice has been restyled and includes a link to the media that the user can click, which will show it to them if they have the necessary permissions.

![image](https://user-images.githubusercontent.com/920448/92341012-b9a2c380-f0ff-11ea-860e-b376b4528357.png)
2020-09-10 09:50:16 +10:00
..
components FEATURE: Allow email image embed with secure media (#10563) 2020-09-10 09:50:16 +10:00
fabricators FIX: generate_topic_thumbnails job infinitely running for corrupted images 2020-08-13 17:08:32 -06:00
fixtures FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
helpers Fix the build. 2020-09-09 15:43:38 +08:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration FIX: Pluralized translation overrides didn't work for en_US 2020-08-29 00:11:46 +02:00
integrity DEV: Check English locale for errors in CI 2020-06-03 21:54:58 +02:00
jobs FIX: Gravatar download attempt if user is missing their email 2020-09-02 20:19:46 -06:00
lib FIX: Make deleted topic post bookmarks more resilient (#10619) 2020-09-07 14:52:14 +10:00
mailers FEATURE: Allow email image embed with secure media (#10563) 2020-09-10 09:50:16 +10:00
models PERF: Keep track of first unread PM and first unread group PM for user. 2020-09-09 14:05:41 +08:00
multisite FIX: invalid urls should not break store.has_been_uploaded? 2020-06-25 15:00:15 +10:00
requests FIX: Admin should always be able to view group messages. 2020-09-09 08:58:21 +08:00
script/import_scripts FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
serializers Add category id to webhook post serializer 2020-09-02 10:42:51 -04:00
services DEV: add plugin hooks for silence message parameters (#10538) 2020-09-01 17:25:24 -07:00
support DEV: Improve docs for Sidekiq job assertion helpers. 2020-07-24 17:37:22 +08:00
tasks FEATURE: Add uploads:batch_migrate_from_s3 task to limit total posts migrated at once (#9933) 2020-06-04 09:48:11 +10:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb FIX: SiteSettings::LocalProcessProvider didn't work on multisite 2020-08-20 11:15:20 +02:00
swagger_helper.rb DEV: Add rswag to aid in api documention (#9546) 2020-04-27 16:40:07 -06:00