Elle interrogeait `db --list`, qui ne LIT jamais le mot de passe : mesuré, `MASTER_PWD="ceci_est_faux" odoo-bin db --list` sort en 0. La boucle des dix essais acceptait donc le premier mot saisi, juste ou faux, et le refus n'arrivait qu'au `--restore` — une fois la base déjà supprimée. C'était exactement ce que cette boucle devait éviter. Seule l'action `drop` consulte le secret, et elle le fait AVANT de regarder la base : `check_super` d'abord, `db_exists` ensuite. Sur un nom tiré d'un uuid4, elle répond sans rien toucher. Mesuré : mauvais mot de passe → code 1 et AccessDenied ; bon → code 0 ; huit bases avant, huit après. --- EN --- It probed `db --list`, which never READS the master password: measured, `MASTER_PWD="ceci_est_faux" odoo-bin db --list` exits 0. The ten-attempt loop therefore accepted the first password typed, right or wrong, and the refusal only came at `--restore` — once the database was already dropped. Precisely what that loop existed to avoid. Only the `drop` action reads the secret, and it does so BEFORE looking at the database: `check_super` first, `db_exists` after. On a uuid4 name it answers without touching anything. Measured: wrong password → exit 1 and AccessDenied; right → exit 0; eight databases before, eight after. Assisted-by: Claude Opus 5 |
||
|---|---|---|
| .. | ||
| migrate | ||
| compare_backup.py | ||
| compare_database_application.py | ||
| db_drop_all.py | ||
| db_restore.py | ||
| delete_production.sh | ||
| download_remote.py | ||
| download_remote.sh | ||
| fix_mariadb_sql_example_1.py | ||
| get_module_list_from_database.py | ||
| get_repo_from_backup.py | ||
| get_repo_from_module.py | ||
| image_db.py | ||
| lib_db_select.sh | ||
| list_remote.py | ||
| mariadb_sql_example_1.sql | ||
| migrate_prod_to_test.sh | ||
| README.base.md | ||
| README.fr.md | ||
| README.md | ||
| restore_mariadb_sql_example_1.sh | ||
Database
This section is for code generator database migrator.
This configuration is for development environnement.
You need to install script ./script/install/install_dev_extra_ubuntu.sh.
Restore database
Run script to restore database:
./script/database/restore_mariadb_sql_example_1.sh