Multiple choice technology security

Analyse following code public void dummyFunction(String var1,String var2){ try{ Connection con=getConnection(); String query=”select * from table1 where col1=”+var1 +”and col2=”+var2; Statement st=conn.createStatement(); ResultSet rs=st.executeQuery(query); …… ….. } catch(Exception e) { } } var1 and var2 are inputs from user directly passed to this functions.

  1. Vulnerable to SQL Injection

  2. Vulnerable to DoS

  3. Vulnerable to Information Disclosure

  4. Code is secure

Reveal answer Fill a bubble to check yourself
D Correct answer