Question: Which statements about executing the following program are correct? (Choose two.) A. Line m1 makes the code susceptible to tainted inputs from the user. B.
Which statements about executing the following program are correct? (Choose two.)

A. Line m1 makes the code susceptible to tainted inputs from the user.
B. Line m2 makes the code susceptible to tainted inputs from the user.
C. The code is not susceptible to tainted inputs from the user.
D. The code is susceptible to an injection attack.
E. The code is not susceptible to an injection attack.
F. The code is susceptible to an injection only if executed with a number as input.
import java.security.*; public class PrintScores { private static final String CODE = "12345"; private static final String SCORES = "test.scores"; public static String getScores (String accessCode) { return Access Controller.doPrivileged } } }); ( new Privileged Action () { public String run() { if (accessCode.equals(CODE)) // m1 return System.getProperty (SCORES); // m2 throw new Security Exception ("Incorrect code"); public static void main(String[] args) { if (args != null && args.length>0) System.out.print (PrintScores.getScores (args[0]));
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
The provided image displays a Java program that involves accessing system properties based on a given access code The correctness of the statements can be determined by analyzing how the program handl... View full answer
Get step-by-step solutions from verified subject matter experts
