How should the developer prevent a cross site scripting vulnerability?
A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter.
How should the developer prevent a cross site scripting vulnerability?
A . ApexPages.currentPage() .getParameters() .get(‘url_param’)
B . ApexPages.currentPage() .getParameters() .get(‘url_param’) .escapeHtml4()
C . String.ValueOf(ApexPages.currentPage() .getParameters() .get(‘url_param’))
D . String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get(‘url_param’))
Answer: D
Latest PDI Practice Questions with 191 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments