-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Features/antiforgery #1537
Features/antiforgery #1537
Conversation
|
||
this.init = function () { | ||
if (document.getElementsByName('__RequestVerificationToken').length > 0) | ||
self.value = document.getElementsByName('__RequestVerificationToken')[0].value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Expected { after 'if' condition.
self.value = document.getElementsByName('__RequestVerificationToken')[0].value; | |
{self.value = document.getElementsByName('__RequestVerificationToken')[0].value;}; |
var self = this; | ||
|
||
this.init = function () { | ||
if (document.getElementsByName('__RequestVerificationToken').length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Strings must use doublequote.
if (document.getElementsByName('__RequestVerificationToken').length > 0) | |
if (document.getElementsByName"__RequestVerificationToken"').length > 0) |
|
||
this.init = function () { | ||
if (document.getElementsByName('__RequestVerificationToken').length > 0) | ||
self.value = document.getElementsByName('__RequestVerificationToken')[0].value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Strings must use doublequote.
self.value = document.getElementsByName('__RequestVerificationToken')[0].value; | |
self.value = document.getElementsByName"__RequestVerificationToken"')[0].value; |
See PR #1742 |
Hi guys
I have added support for antiforgery token validations following recomendations in this link https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery?view=aspnetcore-5.0
Please take a look at it and let me know if it's ok to merge in the next release :)