Hubert Van de Walle (huvw) 071ec7f8c4 [FIX] auth_password_policy: prevent crash when emptying password input
Steps to reproduce
==================

- Go to /web/signup
- In the password field, type something
- Clear the input

Cause of the issue
==================

A bunch of conditions evaluates to NaN inside
`ConcretePolicy.score(password)` when passing en empty string as a
parameter.

Solution
========

An empty password should always have a score of 0 anyway, so we can
do an early return. (The lengthscore would be 0, and we multiply by it
at the end)

opw-3269555

closes odoo/odoo#120711

X-original-commit: 6aa16bb740af14fcebd8f05bdc19c9e8879d77ed
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-05-08 23:39:42 +02:00
2023-05-08 22:39:49 +02:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

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

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%