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

Fix #3358 CSRF meta tags specification #3722

Closed
wants to merge 4 commits into from

Conversation

klimov-paul
Copy link
Member

Fix #3358 unnesessary meta tags in email html

CSRF meta tags specification reworked to be triggered by Request instead of View

@qiangxue
Copy link
Member

qiangxue commented Jun 6, 2014

Well, this fix has several drawbacks:

  • Every request will run this piece of code, no matter view is used or not. This is especially bad for RESTful APIs.
  • Sometimes you may use a different view component than the view application component.
  • There is still coupling between Request and View.

@klimov-paul
Copy link
Member Author

What about #3358 (comment) ?

@qiangxue
Copy link
Member

qiangxue commented Jun 6, 2014

Yes, that's similar to what I proposed. It is also the way used in other frameworks.
We can create a method Html::csrfMetaTags() to encapsulate the needed code and call the method in the head section of the main layout file.

Yes, this will break BC, which is expected.

@cebe
Copy link
Member

cebe commented Jun 6, 2014

@qiangxue That sounds like the best solution to me as there is less coupling between the compoents.

@klimov-paul
Copy link
Member Author

Closed in favor of #3724

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

Successfully merging this pull request may close these issues.

yii2-app-advanced - unnesessary meta tags in passwordResetToken html email
3 participants