diff options
| author | Antonio Espinosa <antespi@gmail.com> | 2016-10-24 19:06:55 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2017-05-29 13:57:10 +0200 |
| commit | a0ff74b78de749b2cdfba8008299eb044bc7ebf2 (patch) | |
| tree | ccb6ab85229e0f0770e0d2771af0ce8f42f001cc /addons/website_mail/controllers/main.py | |
| parent | b21426ab9c9ef6aa46f620a76a0642f324363137 (diff) | |
[FIX] website_mail: do not propagate csrf_token to message_post method
Indeed through portal users can post a message. Form used in order to
do so include a csrf token. However this one should not be propagated
to message_post because it is not a mail_message model field.
This creates unnecessary warnings.
Closes #13956 .
Diffstat (limited to 'addons/website_mail/controllers/main.py')
| -rw-r--r-- | addons/website_mail/controllers/main.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website_mail/controllers/main.py b/addons/website_mail/controllers/main.py index 64f11412aa1..7046695ef9c 100644 --- a/addons/website_mail/controllers/main.py +++ b/addons/website_mail/controllers/main.py @@ -65,6 +65,7 @@ def _message_post_helper(res_model='', res_id=None, message='', token='', token_ res = res.sudo() else: raise NotFound() + kw.pop('csrf_token', None) return res.with_context({'mail_create_nosubscribe': nosubscribe}).message_post(body=message, message_type=kw.pop('message_type', False) or "comment", subtype=kw.pop('subtype', False) or "mt_comment", |
