ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 23 - 312-96 discussion

Report
Export

Stephen is a web developer in the InterCall Systems. He was working on a Real Estate website for one of his clients. He was given a task to design a web page with properties search feature. He designed the following searchpage.jsp

< form Id='form1' method='post' action='SearchProperty.jsp' >

< input type='text' id=''txt_Search' name='txt_Search' placeholder='Search Property...' / >

< input type='Submit' Id='Btn_Search' value='Search' / >

< /form >

However, when the application went to security testing phase, the security tester found an XSS vulnerability on this page. How can he mitigate the XSS vulnerability on this page?

A.
He should write code like out-Write ('You Searched for:' +ESAPI.encoder().encodeForHTML(search));
Answers
A.
He should write code like out-Write ('You Searched for:' +ESAPI.encoder().encodeForHTML(search));
B.
He should write code like out.write ('You Searched for:' + request.qetParameter('search'l.toStrinq(ll;
Answers
B.
He should write code like out.write ('You Searched for:' + request.qetParameter('search'l.toStrinq(ll;
C.
He should write code like out.write ('You Searched for:' + request.qetParameterf'txt Search'));
Answers
C.
He should write code like out.write ('You Searched for:' + request.qetParameterf'txt Search'));
D.
He should write code like out.write (('You Searched for:' +(search));
Answers
D.
He should write code like out.write (('You Searched for:' +(search));
Suggested answer: A
asked 18/09/2024
Mahmoud Ismail
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first