Skip to content

Commit 06ee025

Browse files
fix: prevent delete_all('') DB wipe, add thread safety, validate input types
- #255: Change `if user_id:` to `if user_id is not None:` with explicit ValueError for empty strings, preventing accidental full database wipe - #256: Add threading.Lock around all write operations (add, delete, update, delete_all) to prevent data loss from concurrent writes - #257: Add isinstance(content, str) check in add() to reject non-string types instead of silent SQLite coercion - #243: Promote delete_all() cleanup failure logging from DEBUG to WARNING so orphaned rows in related tables are visible to operators Fixes #255, #256, #257, #243
1 parent 5aeb46d commit 06ee025

1 file changed

Lines changed: 180 additions & 168 deletions

File tree

0 commit comments

Comments
 (0)