Deprecate confusing APIs like “os.path.commonprefix()”

The article argues that confusing APIs like Python’s os.path.commonprefix() should be deprecated because their misleading naming and placement cause developers to misuse them and introduce security vulnerabilities. It shows how decades of confusion around this function led to real path-traversal bugs and concludes that unsafe or misleading APIs should be replaced by clearer alternatives ...

https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix

Deprecate confusing APIs like “os.path.commonprefix()”

The os.path.commonprefix() function has been an API in the Python standard library for at least 35 years (since February 1991) and in that time has been confusing users and creating security issues...

sethmlarson.dev