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

document old way of checking validity of CSRF token #5340

Closed
wants to merge 2 commits into from
Closed

document old way of checking validity of CSRF token #5340

wants to merge 2 commits into from

Conversation

snoek09
Copy link

@snoek09 snoek09 commented May 30, 2015

Q A
Doc fix? yes
New docs? yes
Applies to all
Fixed tickets Related to #4668

Sometimes you want to use CSRF protection in an action where you don't want to use a
Symfony form.

If, for example, you're doing a DELETE action, you can use the :method:`Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\CsrfProviderAdapter::isTokenValid`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move the method role on its own line?

@snoek09
Copy link
Author

snoek09 commented Jun 2, 2015

@xabbuh done, please let me know if this needs any other changes.


If, for example, you're doing a DELETE action, you can use the
:method:`Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\CsrfProviderAdapter::isTokenValid`
method to check the CSRF token::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that this sentence should be worded more "smoothy". Though I'm not sure how. Maybe our native speaker @weaverryan has a suggestion.

@snoek09 snoek09 closed this Oct 13, 2015
@xabbuh
Copy link
Member

xabbuh commented Oct 20, 2015

@snoek09 I am sorry for the delay here. Do you think we should still tackle this and reopen the PR in that case?

@snoek09
Copy link
Author

snoek09 commented Oct 20, 2015

I closed this because it is already merged into 2.6: 85dc294

@xabbuh
Copy link
Member

xabbuh commented Oct 20, 2015

Indeed, but it seems to be missing in the 2.7 version of the docs if I don't miss anything.

@xabbuh
Copy link
Member

xabbuh commented Oct 20, 2015

see #5816

@snoek09
Copy link
Author

snoek09 commented Oct 20, 2015

In that case, just re-use the text and change it where needed.

@xabbuh
Copy link
Member

xabbuh commented Oct 20, 2015

@snoek09 Sorry for poking you again. I had a look at this again and I think we should actually merge this one so that we have a description in the 2.3 docs too. What do you think?

@snoek09
Copy link
Author

snoek09 commented Oct 20, 2015

As I deleted the related fork a while back and closed this PR I can't reopen this.

New PR is here: #5818

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

Successfully merging this pull request may close these issues.

2 participants