nerdexam
CompTIA

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…

Security architecture

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)
  • A
    6% (2)
  • B
    88% (29)
  • C
    3% (1)
  • D
    3% (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

#input validation#web application security#secure coding#error handling

Community Discussion

No community discussion yet for this question.

Full SY0-301 Practice