Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • security Online Quiz - 10
  • ```java public void dummyFunction(String var1,String var2){ ...
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. This code is

technology security
  1. Vulnerable to SQL Injection

  2. Vulnerable to DoS

  3. Both a & b

  4. None of the above


Show answer
Correct Option: C

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy