News for hackers. Stuff that matters.
Re:CSRF in Doorkeeper OAuth2 gem by rudolf0 on Wednesday December 17, 2014 @11:00AM (#8762723)
Do you mean a language with a very strong type system like Haskell, where you could create a web framework in which things like user input have different types associated with them? Those can offer some real advantages by never mixing untrusted input with page output and various calls to other systems.

But you don't get a lot of web application security advantages when you compare, say, Python and Java.

Of course, a very weak type system like PHP's can definitely introduce additional security flaws.

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.

Re:CSRF in Doorkeeper OAuth2 gem by lmm on Thursday December 18, 2014 @10:42AM (#8767742)
I'm mostly comparing with Scala because that's what I use most of the time. But even in Java it's very possible to get the same safety advantages - it's just that working with that level of type detail gets extremely cumbersome, so for most projects it's not worth it.