Q: To improve the overall quality of web applications, developers should abide by which of the following rules?
-
A
Allow the use of HIDDEN form fields
-
B
Clean and validate all user input
-
C
Use GET instead of POST
-
D
Trust user-supplied data
B
Answer:
B
Explanation:
The correct answer is:
Clean and validate all user input
Explanation: To improve the overall quality and security of web applications, it is essential to clean and validate all user input. This ensures that data entered by users is both expected and safe to use, helping to prevent common vulnerabilities like SQL injection, cross-site scripting (XSS), and other malicious attacks that exploit improperly validated input.
The other options:
- Allowing the use of HIDDEN form fields can be risky if not handled properly, as attackers might manipulate them.
- Using GET instead of POST is not advisable for sensitive operations because GET data is visible in the URL and can be cached.
- Trusting user-supplied data is inherently insecure, as it opens up the application to various attacks. It is crucial to always validate and sanitize such data.
Related Topic:
Share Above MCQ