Join Nostr
2026-04-03 20:10:58 UTC
in reply to

Matt Palmer on Nostr: nprofile1q…52pg0 the limit of tainting is that it can only say a string is "safe" ...

the limit of tainting is that it can only say a string is "safe" or "unsafe", without answering the question "safe for *what*?". If you untaint the value with a "safe for HTML" regex, but then it gets eval'd instead, Unpleasantness will result. The solution is to have separate "safe for HTML" and "safe for eval" data types, and the only values accepted by methods that construct HTML or eval code are the relevant "safe for" types. Yes, it's more faffing around, but far more secure.