Bug
sanitize_path_component() in path_safety.py (~line 286) uses '..' in name which is a substring check. This blocks legitimate book titles containing consecutive dots:
- "What If..?"
- "Mr.. Smith"
- "Vol. 1... The Beginning"
The intent is to block directory traversal (../) but the implementation catches innocent names.
Fix
Replace the substring check with a proper path component check:
# Instead of: '..' in name
# Use: any(part == '..' for part in name.split('/'))
# Or regex: re.search(r'(^|[\\/])\.\.($|[\\/])', name)
Severity
Low — causes some books to never get rename proposals. No data loss but missed identifications.
Found via code audit.
Bug
sanitize_path_component()inpath_safety.py(~line 286) uses'..' in namewhich is a substring check. This blocks legitimate book titles containing consecutive dots:The intent is to block directory traversal (
../) but the implementation catches innocent names.Fix
Replace the substring check with a proper path component check:
Severity
Low — causes some books to never get rename proposals. No data loss but missed identifications.
Found via code audit.