caelum / vraptor4

A web MVC action-based framework, on top of CDI, for fast and maintainable Java development.
http://vraptor.org
Apache License 2.0
350 stars 332 forks source link

add csrf protection #509

Open plentz opened 10 years ago

plentz commented 10 years ago

a few ideas

Turini commented 9 years ago

I'm going to work on this

dobau commented 9 years ago

Nice Turini, but are you going implement a plugin or a vraptor feature?

asouza commented 9 years ago

In Spring MVC you can use CSRF without any view tags... It only put a variable ${csrfTokenValue} and ${csrfTokenParameterName} in the request and you can use as you wish. Of course, if you want to create some tags, nobody will complain :).

Em seg, 24 de ago de 2015 às 12:27, Rafael Alves notifications@github.com escreveu:

Nice Turini, but are you going implement a plugin or a vraptor feature?

— Reply to this email directly or view it on GitHub https://github.com/caelum/vraptor4/issues/509#issuecomment-134250191.

Turini commented 9 years ago

Hi @dobau. I'm implementing it as a feature toggle on core, disabled by default. And without any tags, just like Spring MVC (tks @asouza) and MVC 1.0 spec does:

<input type="hidden" name="${csrf.name}" value="${csrf.token}"/>
nbluis commented 7 years ago

Hello @Turini . Has any evolution been made about this?

Turini commented 7 years ago

not yet, @nbluis. It's in a freeze time by now, but I hope to work on this feature soon. any help would be very welcome (:

nbluis commented 7 years ago

@Turini thanks for the feedback.

I think I'll implement using the OWASP CSRF Guard.

Can be easily added to my current project. It can serve as a reference when doing this implementation.