News for hackers. Stuff that matters.
Re:Nobody Cares About Security by mamcx on Monday September 09, 2024 @12:36PM (#41490283)
An angle that sometimes helps is reframing security as (business) validation and introducing proper type modeling.

The best thing anybody can do for this is making apis that make `unrepresentable` unsafe things.

` A classic is password length. Instead of `login(user:str, pwd:str)`, do `login(user:NotEmptyStr, pwd:ValidPwd)`.

This is stuff that must be done in the lower layers, to take advantage of how lazy people is. Do it for the most popular libraries and frameworks and we are talking about real impact.

Re:Nobody Cares About Security by mandelbrotwurst on Monday September 09, 2024 @12:53PM (#41490505)
Is the idea that the attacker is brute forcing the login method and they are less likely to be successful if the input must be passed in an unexpected format?
Re:Nobody Cares About Security by d_tr on Monday September 09, 2024 @01:03PM (#41490672)
Types where the constructor takes care of the rules and aborts if you pass it something stupid (like an empty string for a user name).
Re:Nobody Cares About Security by port19 on Tuesday September 10, 2024 @03:23AM (#41498078)
This is a bit of a stretch, but I'm willing to entertain the idea if you could toss me a link or two to more in-depth write ups on the topic