Files
odoo_source/addons/mass_mailing/controllers
Olivier Dony 31e81e7b8f [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.
2017-03-07 19:25:02 +01:00
..