diff options
| author | Olivier Dony <odo@openerp.com> | 2017-03-07 19:23:33 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-03-07 19:25:02 +0100 |
| commit | 31e81e7b8f8803abf0496e10ce0c25c4921030f7 (patch) | |
| tree | 69f797cc77839f4e1f0e983f43f83991f2311258 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 4729632275661b94fb275cbe817845db92cfc5f4 (diff) | |
[FIX] mass_mailing: use consistent types for unsub token check
Passlib's consteq() function only works when both values are
of the same type.
`_unsubscribe_token` uses hmac.hexdigest() which always returns
byte-strings, so we need to ensure that the token passed in GET
parameters is cast to byte-string too.
In addition, _unsubscribe_token() is expected to always derive
the same token for the same list, res_id and email. It already
takes care of ID passed as strings/int, but failed to make sure
that the email can be passed as a byte-string or unicode-string.
Forcing it to unicode before deriving the token takes care of that.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
