SY0-301 · Question #66
After Matt, a user, enters his username and password at the login screen of a web enabled portal, the following appears on his screen: `Please only use letters and numbers on these fields' Which of…
The correct answer is B. Proper input validation. Input validation is the process of inspecting and enforcing rules on data entered by users before it is processed. The message 'Please only use letters and numbers on these fields' is the system correctly rejecting input that contains disallowed characters (such as special…
Question
After Matt, a user, enters his username and password at the login screen of a web enabled portal, the following appears on his screen:
`Please only use letters and numbers on these fields' Which of the following is this an example of?
Options
- AProper error handling
- BProper input validation
- CImproper input validation
- DImproper error handling
How the community answered
(33 responses)- A6% (2)
- B88% (29)
- C3% (1)
- D3% (1)
Explanation
Input validation is the process of inspecting and enforcing rules on data entered by users before it is processed. The message 'Please only use letters and numbers on these fields' is the system correctly rejecting input that contains disallowed characters (such as special characters) and informing the user of the acceptable format. This is proper input validation - it enforces an allowlist of permitted characters, which is a security best practice that helps prevent injection attacks. It is not improper input validation because the system is correctly checking and enforcing input rules. It is also not about error handling, which refers to how exceptions and unexpected conditions are managed in code.
Topics
Community Discussion
No community discussion yet for this question.