discourse/spec
Régis Hanol d7aa13328d
FIX: strip unsubscribe links in incoming emails (#30695)
When we send an email notification to a user, we always include a link
that will allow them unsubscribe to these emails.

If the user reply to the email notification, the link to unsubscribe
might still be present in the final post (often in the elided part).

Since those links do not require authentication to unsubscribe a user
(this is a feature, not a bug), we would like to avoid showing them to
other users on Discourse.

(If such an email is forwarded elsewhere, then it's totally out of our
control.)

This commmit ensures we always strip those unsubscribe links from any
incoming email to avoid making it easier to unsubscribe another user.

Since the format we use for those links might be similar to the ones
used by other applications, the regular expression used to match those
links uses the absolute URL of the Discourse (aka.
`Discourse.base_url`).
2025-01-13 11:33:46 +01:00
..
fabricators FEATURE: Improve wizard quality and rearrange steps (#30055) 2025-01-02 09:28:23 +10:00
fixtures FIX: Allow attachments to be opened in a new tab instead of downloading them (#30535) 2025-01-07 10:32:32 +08:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers UX: add color-scheme meta tag to _head (#30245) 2024-12-13 08:10:08 -03:00
import_export
initializers
integration SECURITY: When enabled only allow Discourse Connect logins 2024-12-19 13:13:23 -03:00
integrity DEV: Add spec to ensure app works with multiple tagged loggers 2024-08-13 18:10:03 +02:00
jobs DEV: Allow export user archive (job) to be requested and sent to an admin (#30543) 2025-01-03 14:27:10 +08:00
lib FIX: strip unsubscribe links in incoming emails (#30695) 2025-01-13 11:33:46 +01:00
mailers FEATURE: add support for One-Click unsubscribe (RFC 8058) 2024-12-31 15:28:59 +01:00
migrations DEV: update fa6 icons to drop fa prefix (#30100) 2024-12-05 10:00:41 +08:00
models FEATURE: add drafts dropdown menu (#30277) 2025-01-13 13:33:57 +04:00
multisite DEV: Improve distributed cache multisite specs (#30662) 2025-01-13 17:03:56 +11:00
requests FIX: Allow admins to use reserved usernames (#30262) 2025-01-13 17:30:36 +10:00
script/import_scripts DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
serializers FIX: ensure GroupChooser works with localized group names (#30593) 2025-01-13 11:29:04 +01:00
services FEATURE: Add option to hide full name input at signup (#30471) 2024-12-30 22:26:20 +03:00
support DEV: Remove invalid parsing options (#30545) 2025-01-03 13:17:49 +01:00
system FEATURE: add drafts dropdown menu (#30277) 2025-01-13 13:33:57 +04:00
tasks DEV: Fix constant redefinition warnings when running specs (#29837) 2024-11-20 15:17:36 +11:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb DEV: Fix flaky deprecated setting specs (#30550) 2025-01-04 12:55:22 +01:00
regenerate_swagger_docs
swagger_helper.rb