diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-12-01 09:17:50 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-12-01 09:17:50 +0000 |
| commit | ee2625a9311f308b9df3fc160dc5c9fe4cc5a497 (patch) | |
| tree | 760c9380a4e4472f552bf64786da8411f883a74b /addons/resource | |
| parent | 8a47ed9c6e55fe0fac5cbca2d57619fa4e43490c (diff) | |
[IMP] base: relax api keys env check
Before this change, the apikeys' ``_check_credentials`` override would
hard-check the ``'interactive'`` key. This turns out to be less than
ideal for compatibility with older code which might not properly
forward the environment (or might call ``_check_credentials`` from a
non-override and pass in an empty env) as it straight crashes.
Update the override to assume an interactive login if the information
is missing (as that seems like the more secure option: it ignores
apikeys and takes 2FA in account if enabled). Also trigger a warning
if the key was missing from the environment, such that the maintainer
hopefully takes a look at the issue.
Also allow a ``user_agent_env`` of ``None``, this will also trigger
the warning so seems OK.
closes odoo/odoo#62664
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/resource')
0 files changed, 0 insertions, 0 deletions
