mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 01:43:45 +08:00
61c87fb59f
There are cases where a user can copy image markdown from a public post (such as via the discourse-templates plugin) into a PM which is then sent via an email. Since a PM is a secure context (via the .with_secure_uploads? check on Post), the image will get a secure URL in the PM post even though the backing upload is not secure. This fixes the bug in that case where the image would be stripped from the email (since it had a /secure-uploads/ URL) but not re-attached further down the line using the secure_uploads_allow_embed_images_in_emails setting because the upload itself was not secure. The flow in Email::Sender for doing this is still not ideal, but there are chicken and egg problems around when to strip the images, how to fit in with other attachments and email size limits, and when to apply the images inline via Email::Styles. It's convoluted, but at least this fixes the Template use case for now. |
||
---|---|---|
.. | ||
authentication_results.rb | ||
build_email_helper.rb | ||
cleaner.rb | ||
message_builder.rb | ||
message_id_service.rb | ||
poller.rb | ||
processor.rb | ||
receiver.rb | ||
renderer.rb | ||
sender.rb | ||
styles.rb | ||
validator.rb |