QuestionQ48

VerifiedSecure Coding Practices for Input Validation

Sam, an application security engineer at INFRA INC., was performing a secure code review of a Java application. He found that the developer used the code shown below. Identify the security mistake the developer coded:

Question Image

Explanation

Rejecting input based on a list of known dangerous strings is a blacklist input-validation approach. Such denylists are incomplete and can be bypassed by unexpected input variants; validation should instead allow only the explicitly permitted characters and formats.

Community Discussion

No comments yet. Be the first to start the discussion!