diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-15 17:27:24 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-08-20 23:25:54 +0200 |
| commit | 481a00dc4b82bc1b2cbbd6079a147fe230ac57bd (patch) | |
| tree | 975b178f4e4a3733b904bd511d905160014ec009 /addons/web_editor/models/ir_qweb.py | |
| parent | 9d83784f1df18306b6166fd92a0573f39bf6262d (diff) | |
[FIX] P3: hash/hmac payload must be bytes
Diffstat (limited to 'addons/web_editor/models/ir_qweb.py')
| -rw-r--r-- | addons/web_editor/models/ir_qweb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/models/ir_qweb.py b/addons/web_editor/models/ir_qweb.py index 4b1cd512e06..f4a25a8b990 100644 --- a/addons/web_editor/models/ir_qweb.py +++ b/addons/web_editor/models/ir_qweb.py @@ -315,7 +315,7 @@ class Image(models.AbstractModel): if max_width or max_height: max_size = '%sx%s' % (max_width, max_height) - sha = hashlib.sha1(getattr(record, '__last_update')).hexdigest()[0:7] + sha = hashlib.sha1(getattr(record, '__last_update').encode('utf-8')).hexdigest()[0:7] max_size = '' if max_size is None else '/%s' % max_size src = '/web/image/%s/%s/%s%s?unique=%s' % (record._name, record.id, field_name, max_size, sha) |
