Question 215 of 270 from exam CAS-003: CompTIA CASP+

Question 215 of 270 from exam CAS-003: CompTIA CASP+

Question

A security engineer is assisting a developer with input validation, and they are studying the following code block:

string accountIdRegexp = “TODO, help!”;

private static final Pattern accountIdPattern =
(account IdRegexp”) ;
string accountid = reques

Pattern. compile

getParameter (“accountNumber”
if (laccountidPattern.matcher (accountId) -matches() {
System. out. pri:
} else {
// continue

(“account ID format incorrect”);

The security engineer wants to ensure strong input validation is in place for customer-provided account identifiers.

These identifiers are ten-digit numbers.

The developer wants to ensure input validation is fast because a large number of people use the system.

Which of the following would be the BEST advice for the security engineer to give to the developer?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.