Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF vulnerability #696

Closed
sercanvirlan opened this issue Oct 16, 2014 · 5 comments
Closed

CSRF vulnerability #696

sercanvirlan opened this issue Oct 16, 2014 · 5 comments

Comments

@sercanvirlan
Copy link

I think there is no csrf check for ajax. I have removed the token value from frontside, the server accepted my request.

This is very important thing. Am i right?

@daftspunk
Copy link
Member

The CSRF token is passed as a courtesy, it cannot easily be generated via JavaScript and hence is not a requirement of an AJAX postback.

You can verify the authenticity of a CSRF token in component/page code using

if (Session::token() != Input::get('_token')) { /* Invalid token */ }

@that0n3guy
Copy link
Contributor

It can't be generated, but it is commonly used w/ ajax: http://words.weareloring.com/development/laravel/laravel-4-csrf-tokens-when-using-jquerys-ajax/

Thats one of the ways I've seen do it.

@daftspunk
Copy link
Member

daftspunk commented Jun 20, 2015

~~More on this can be found here: ~~
https://github.com/octobercms/library/issues/105

CSRF was added to the backend here:
d9dfa21

@oliverpool
Copy link
Contributor

More on this can be found here:
https://github.com/octobercms/library/issues/105

@daftspunk : the issues are now closed on https://github.com/octobercms/library, which means that the link you provided returns an error 404 (maybe only for non-contributors)

Could you maybe copy/paste the relevant informations from this issue ?

@daftspunk
Copy link
Member

Comment updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants