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

Features/antiforgery #1537

Closed
wants to merge 2 commits into from
Closed

Conversation

walcher
Copy link

@walcher walcher commented Mar 8, 2021

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 :)

@dnfadmin
Copy link

dnfadmin commented Mar 8, 2021

CLA assistant check
All CLA requirements met.


this.init = function () {
if (document.getElementsByName('__RequestVerificationToken').length > 0)
self.value = document.getElementsByName('__RequestVerificationToken')[0].value;
Copy link
Member

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.

Suggested change
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)
Copy link
Member

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.

Suggested change
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;
Copy link
Member

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.

Suggested change
self.value = document.getElementsByName('__RequestVerificationToken')[0].value;
self.value = document.getElementsByName"__RequestVerificationToken"')[0].value;

@tidyui tidyui mentioned this pull request Oct 21, 2021
@tidyui
Copy link
Member

tidyui commented Oct 21, 2021

See PR #1742

@tidyui tidyui closed this Oct 21, 2021
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.

3 participants