News for hackers. Stuff that matters.
Re:CSRF in Doorkeeper OAuth2 gem by jfoutz on Wednesday December 17, 2014 @02:02PM (#8763684)
A common pattern (at least getting there) in Scala/F#/Haskell is to have paired types, UserInput and ValidatedUserInput. All the business logic requires the Validated kind. A programmer can be certainly be lazy and just return the supplied value, but this is a conscious choice to do the wrong thing.

You can't accidentally forget to validate form parameters. It won't compile. This is pretty easy to do in Java. On the weaker side, I would assume php and python have something like perl's taint mode. It's such a simple thing and it avoids so many xss problems.

There are no comments on this comment yet.