exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 138 discussion

Actual exam question from Cisco's 350-901
Question #: 138
Topic #: 1
[All 350-901 Questions]

A web application is susceptible to cross-site scripting.
Which two methods allow this issue to be mitigated? (Choose two.)

  • A. Use only drop downs.
  • B. Limit user input to acceptable characters.
  • C. Encrypt user input on the client side.
  • D. Use AES encryption to secure the script.
  • E. Remove all HTML/XML tags from user input.
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
PopLife
Highly Voted 4 years, 6 months ago
B. Limit user input to acceptable characters. E. Remove all HTML/XML tags from user input.
upvoted 32 times
...
4a6c58a
Most Recent 7 months, 1 week ago
B. Limit user input to acceptable characters. E. Remove all HTML/XML tags from user input.
upvoted 1 times
...
Teringzooi
2 years, 2 months ago
Selected Answer: BE
Correct answers: B & E B. Limit user input to acceptable characters. E. Remove all HTML/XML tags from user input. https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
upvoted 2 times
...
designated
2 years, 3 months ago
Selected Answer: BE
B and E are correct: "To mitigate this attack, the easiest way is to escape any user input, both when receiving it from the user and when sending data to other users. For example, replacing the < character with &lt; or &#60; for the web content would disable all HTML tags. In Python, this can be done with the standard html.escape() and html.unescape() functions. Sometimes some HTML tags are acceptable, so escaping them all is not an option. In this case, sanitization is a suitable solution. Sanitization processes untrusted user input and runs it through the filter, which allows valid content but strips anything that is not permitted. For example, it may allow <A>, <IMG>, <B> HTML tags but strip any other tags."
upvoted 2 times
...
__al__
2 years, 8 months ago
Selected Answer: BE
B and E
upvoted 3 times
...
B3nd3cida
3 years, 7 months ago
I agree with PopLife: B. Limit user input to acceptable characters. This might be related to the concept of XSS Filters/Sanitization, in which you take the untrusted user input and strip out anything that is not permitted. E. Remove all HTML/XML tags from user input. It might related to the concept XSS Escaping. Like HTML, CSS, XML, Javascripts Escaping. https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
upvoted 3 times
...
FR99
4 years, 4 months ago
Agree with PopLife, answer should be 'B & E'
upvoted 2 times
endermao
4 years, 2 months ago
Why use only drop-downs not working, as using drop-downs can totally eliminate the chance of user input.
upvoted 1 times
flambadone
4 years, 2 months ago
My logic on this one is "a web app is susceptible" meaning it can happen. XSS can't happen with drop downs. So it's not susceptible. But technically you're right in that drop downs would eliminate it, but I'm sticking with B&E here too. Maybe you need user input for something?
upvoted 2 times
endermao
4 years, 2 months ago
Thanks flambadone for the great explanation, yes the susceptible makes sense here
upvoted 1 times
...
...
kayleen
4 years ago
Without additional code checks, dropdowns only limit what a user can input with browser. They could still craft a request (with postman/curl) with invalid data.
upvoted 2 times
QuiShong
2 years, 6 months ago
Exactly this. Press F12 in any browser and edit the dropdown to be a text field. Now you can send any data you want if the server doesn't validate the data
upvoted 1 times
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...