Skip to main content

CodeSOD: Insanitize Your Inputs

2 months 2 weeks ago

Honestly, I don't know what to say about this code sent to us by Austin, beyond "I think somebody was very confused".

string text; text = ""; // snip box.Text = text; text = ""; text = XMLUtil.SanitizeXmlString(text);

This feels like it goes beyond the usual cruft and confusion that comes with code evolving without ever really being thought about, and ends up in some space outside of meaning. It's all empty strings, signifying nothing, but we've sanitized it.

[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.
Remy Porter