Knowee
Questions
Features
Study Tools

Which of the following are used to protect against Cross Site Request Forgery (CSRF) attacks? Choose the best answer.A ) Web API, by defaultB ) i) Razor pages POST forms, by default ii) Web API, by default iii) MVC views @Html.AntiForgeryToken()C ) MVC views @Html.AntiForgeryToken()D ) i) Razor pages POST forms, by default ii) MVC views @Html.AntiForgeryToken()E ) Razor pages POST forms, by default

Question

Which of the following are used to protect against Cross Site Request Forgery (CSRF) attacks? Choose the best answer.A ) Web API, by defaultB ) i) Razor pages POST forms, by default ii) Web API, by default iii) MVC views @Html.AntiForgeryToken()C ) MVC views @Html.AntiForgeryToken()D ) i) Razor pages POST forms, by default ii) MVC views @Html.AntiForgeryToken()E ) Razor pages POST forms, by default

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The best answer is D) i) Razor pages POST forms, by default ii) MVC views @Html.AntiForgeryToken().

This is because Razor pages POST forms and MVC views @Html.AntiForgeryToken() are both used to protect against Cross Site Request Forgery (CSRF) attacks.

Razor pages POST forms have built-in anti-forgery tokens that are automatically sent with requests, which helps to prevent CSRF attacks.

MVC views @Html.AntiForgeryToken() is a method that generates an anti-forgery token to be used in a form. When the form is submitted, the anti-forgery token is validated to ensure that the request is not a CSRF attack.

Web API, by default, does not protect against CSRF attacks. Therefore, options A, B, and E are not correct.

Option C is not correct because it only includes MVC views @Html.AntiForgeryToken(), but not Razor pages POST forms.

This problem has been solved

Similar Questions

Which of the following methods can be used to prevent Cross-Site Request Forgery (CSRF) attacks?1 pointA) Input validationB) Output encodingC) Anti-CSRF tokensD) Secure cookies

Which of the following is a common vulnerability in web applications? Cross-site scripting (XSS) Cross-site request forgery (CSRF) SQL injection All of the above

Question 9What is the purpose of the Anti-Forgery Token in ASP.NET?1 pointTo prevent cross-site scripting (XSS) attacks.To encrypt sensitive data in web forms.To prevent Cross-Site Request Forgery (CSRF) attacks.To authenticate and authorize users for accessing resources in a web application.

Identify the django tags used to provide protection against CSRF attacks that can be very dangerous. when the session of the user starts on a website, a token is generated which is then cross-verified with the token present with the request whenever a request is being processed.

Please choose the correct answer.The most prominent vulnerability nowadays is:Cross Site Request Forgery (CSRF)Server Side Request Forgery (SSRF)Cross Site Scripting (XSS)Broken Access Control

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.