fix: replace string-prefix check in safe_extractall with commonpath
`startswith` is the wrong primitive for "is target inside directory base": once a trailing separator drops anywhere along the way, sibling directories whose names extend base match. We could spot-fix by re-appending the separator before the check, but `commonpath` makes the directory-boundary intent explicit and removes the failure mode entirely. Fixes GHSA-6cmm-8875-5pcw. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
F
Feanil Patel committed
e552907ff33a7b2e53f99b819123c9dacdfc127a
Parent: 5eae6e5