mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 08:07:17 +08:00
FIX: during concurrent emails generation renderer should not be reused
Our instance used for template rendering needs a lock to ensure there is no race condition where rendering happens on 2 threads at the same time. This can lead to local poisoning which can cause unexpected results in emails
This commit is contained in:
@ -94,7 +94,7 @@ module Email
|
||||
html_override.gsub!("%{respond_instructions}", "")
|
||||
end
|
||||
|
||||
html = UserNotificationRenderer.instance.render(
|
||||
html = UserNotificationRenderer.render(
|
||||
template: 'layouts/email_template',
|
||||
format: :html,
|
||||
locals: { html_body: html_override.html_safe }
|
||||
|
Reference in New Issue
Block a user