4 ms·
A lot of (most?) type systems can enforce this, but don't by default. You'd define a class "SanitizedStr" (or in this particular case "Path") and have all path
by joshuamorton 5y ago
A lot of (most?) type systems can enforce this, but don't by default.
You'd define a class "SanitizedStr" (or in this particular case "Path") and have all path operations work on that.
Python's pathlib sort of does this, although there's still attacks possible with stuff like joining with an absolute path.