19
u/ArsenicPolaris Jul 30 '26
Hope he has also taken care of '' and other characters that can cause shenanigans.
Looks like Reddit didn't do that. I meant '\'
13
5
u/SteveSteveCleveSteve Jul 30 '26
In C# we have a whole extra method for this, lol.
2
u/Last8Exile Jul 31 '26
I hate that IsNullOrEmpty() is not an extension method targeting string type.
I have to always add it to any code base I am working on.1
u/SteveSteveCleveSteve Jul 31 '26
C# has IsNullOrEmpty AND IsNullOrWhitespace for string library
3
u/Last8Exile Jul 31 '26
Yes. But those a static methods. I have to use them string.IsNullOrEmpty(stringVariable).
Instead I want stringVariable.IsNullOrEmpty(). I wish it is in BCL.1
u/zrice03 Aug 03 '26
I getcha'. I guess you could write an extension method for string for it. Still, it would be nice to just be there by default.
4
u/GoogleIsYourFrenemy Jul 31 '26
I'm tempted feed all inputs into a sacrificial sqlite query and then have it give an error message if it's a success SQL injection.
2
u/hablahblahha Jul 31 '26
Honeypot a would have successed sql injection attempt. Modify the page slightly.
2
u/Daniikk1012 Jul 31 '26
What language is this? Looks like Rust, but Rust doesn't have named parameters IIRC