86ffeb2e5d5e8f42046491cd86308ebbf49d7b80
Steps to reproduce: - take a project; - change the visibility to allow sharing; - click on "SHARE EDITABLE"; - share the project with a portal user; - login as portal; - try to open a project task. Remark: the problem does not occur for all tasks. Issue: A traceback appears. Cause: Error occurs because: `return (token and record and consteq(record[token_field], token))` compare two values with different type. - `token` is equal to `'null'` - `record[token_field]` is equal to `False` In the code: `consteq = hmac_lib.compare_digest` > `hmac.compare_digest(a, b)` Return `a == b`. This function uses an approach designed to prevent timing analysis by avoiding content-based short circuiting behaviour, making it appropriate for cryptography. a and b must both be of the same type: either str (ASCII only, as e.g. returned by HMAC.hexdigest()), or a bytes-like object. [source](https://docs.python.org/3/library/hmac.html#hmac.compare_digest) The source of the problem is upstream to this comparison. Indeed, we first test if we have a token. As the value of the token is `'null'`, we pass the condition. Solution: It is necessary to have a token equal to `False` if the task has not token. Therefore, whatever the value of the token (token value or `False`), we have to update the token. opw-3217490 closes odoo/odoo#115947 X-original-commit: dd3a59fa28c5644be93cc2778e0c6854a4481d51 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%