fix(lib): hardening and edge-case bugfixes (FW-12, FW-16 round)

- Restored .bak generation to maintain P0-B backup invariants
- Fixed stale NFS warning message to reflect SQLite DELETE fallback
- Replaced vulnerable yaml.replace with os.path.splitext globally
- Ensured YAML dump occurs after conn.commit() to prevent partial syncs
- Re-applied chmod 0600 on SQLite -wal and -shm files
This commit is contained in:
2026-06-21 08:43:06 +00:00
parent 9b797a5c8c
commit 478be56679
3 changed files with 28 additions and 18 deletions
@@ -238,7 +238,7 @@ try:
d
except NameError:
import sqlite3
db_path = yaml_path.replace('.yaml', '.db')
db_path = os.path.splitext(yaml_path)[0] + '.db'
d = {}
try:
if os.path.exists(db_path):