mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 03:32:40 +08:00
d7aa13328d
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`). |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
generator | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
migrations | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |