ISC2 Certified Secure Software Lifecycle Professional (CSSLP) Practice Question
A developer is updating an e-commerce site to display customer-supplied product reviews in an HTML template. The reviews are saved in the database without modification. To stop attackers from injecting malicious scripts that execute in shoppers' browsers, which control should the developer add to the presentation layer?
Obfuscate the site's JavaScript files with a packer during the build process.
Require multi-factor authentication for users who submit reviews.
Apply HTML entity encoding to the review text immediately before it is written to the page.
Reject any review whose length exceeds a predefined maximum.
Cross-site scripting occurs when untrusted data is sent to a browser without proper output handling. The safest countermeasure is context-aware output encoding: before the review text is written into the HTML response, characters such as <, >, ", and & are converted to their corresponding HTML entities. This breaks any script tags an attacker might have stored, rendering them harmless. Merely limiting length, adding MFA, or obfuscating site JavaScript does not neutralize executable payloads in user-supplied content.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is HTML entity encoding?
Open an interactive chat with Bash
What is Cross-Site Scripting (XSS)?
Open an interactive chat with Bash
Why is context-aware output encoding important?
Open an interactive chat with Bash
What is HTML entity encoding, and how does it work?
Open an interactive chat with Bash
What is cross-site scripting (XSS), and why is it dangerous?
Open an interactive chat with Bash
What is context-aware output encoding, and why is it important?
Open an interactive chat with Bash
ISC2 Certified Secure Software Lifecycle Professional (CSSLP)
Secure Software Implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .