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

A. Line p1 makes the code susceptible to tainted inputs from the user.
B. Line p2 makes the code susceptible to tainted inputs from the user.
C. Line p3 makes the code susceptible to tainted inputs from the user.
D. The code is not susceptible to tainted inputs from the user.
E. Line p1 exposes sensitive information.
F. Line p2 exposes sensitive information.
G. Line p3 exposes sensitive information.
H. The code does not expose any sensitive information.
import java.security.*; import java.util.*; public class MagicTrick { private static final String WORD = "abracadabra"; private static List trick = new ArrayList (); public static List castSpell (String magic) { return AccessController.doPrivileged ( } } } }); new PrivilegedAction () { public List run() { if (magic.equals IgnoreCase (WORD)) { if(trick.isEmpty()) trick.add(System.getProperty (magic)); // p2 // p3 return trick; // pl } public static void main(String[] args) { if(args = null && args.length>0) } throw new SecurityException ("Incorrect code"); System.out.print (MagicTrick.castSpell (args [0]));
Step by Step Solution
3.45 Rating (148 Votes )
There are 3 Steps involved in it
Based on the provided Java program here are the assessments for each of the statements A Line p1 makes the code susceptible to tainted inputs from the ... View full answer
Get step-by-step solutions from verified subject matter experts
