News for hackers. Stuff that matters.
Re:Format Strings in Rust 1.58 by thinkharderdev on Friday January 14, 2022 @07:58AM (#29933878)
It seems perverse to make a ubiquitous operation (formatting a string) intentionally hard just because some people may use it for inappropriate purposes such as building SQL queries from untrusted input. Sure, we should have ergonomic easy of building prepared statements and such but that doesn't seem like something that belongs in the standard library. Or maybe it does. But either way there are many, many legitimate use cases for string formatting.
Re:Format Strings in Rust 1.58 by pron on Saturday January 15, 2022 @02:57PM (#29949618)
But you don't need to make it harder in order to make it safer. You just need to think more about the security concerns and come up with solutions, as others have.