EC-Council
312-92 · Question #53
EC-Council 312-92 Exam After learning from an external auditor that his code was susceptible to attack, George decided to rewrite some of his code to look like the following. What is George preventing
The correct answer is B. XSS attack. See the full explanation below for the reasoning.
Question
EC-Council 312-92 Exam After learning from an external auditor that his code was susceptible to attack, George decided to rewrite some of his code to look like the following. What is George preventing by changing the code? public voif doContent(...) { ... String s; if ((s = getUsernameByID("userid")) != null) { s = StringUtils.encodeToHTML(s, 50); response.write("<br>Applicant:<u>" + s + "</u>"); } ... }
Options
- AQuery string manipulation
- BXSS attack
- CCookie poisoning
- DSQL injection
How the community answered
(38 responses)- A8% (3)
- B76% (29)
- C3% (1)
- D13% (5)
Community Discussion
No community discussion yet for this question.