Which of the following best describes a Reflected XSS attack?
Think about when the malicious script runs immediately after clicking a link.
Reflected XSS happens when malicious code is part of a URL or input and runs immediately without being stored.
What will be the output of the following simplified server-side code snippet when the input is <script>alert('XSS')</script>?
def render_page(user_input): return f"<html><body>Welcome {user_input}</body></html>" print(render_page("<script>alert('XSS')</script>"))
Check if the input is escaped or not before rendering.
The code directly inserts user input into HTML without escaping, so the script tags remain and execute.
Which assertion correctly verifies that a web page output does NOT contain executable script tags after input sanitization?
Think about how to confirm the absence of script tags.
To ensure no script tags exist, assert that '