Skip to content

When str.lower() is a security vulnerability in Python

sethmlarson.dev
3 pointsSethMLarson1 comment
On HN

Comments

I'm not exactly sure what's special about version 3.2 of Unicode, but it's special enough to get separate support in `unicodedata`. If there are others who need the 3.2 case-folding behaviour, maybe `str` should get a separate method for it? Or at least, a (probably keyword-only, because people with this use case will want it called out pretty explicitly, I imagine) parameter to `str.lower`.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.