hardmulti selectObjective-mapped

A support portal lets users upload files and name them manually. During review, a tester submits a filename containing path traversal sequences, and logs later show the application trying to access files outside the intended upload folder. Which two changes best address the flaw? Select two.

Question 1hardmulti select
Full question →

A support portal lets users upload files and name them manually. During review, a tester submits a filename containing path traversal sequences, and logs later show the application trying to access files outside the intended upload folder. Which two changes best address the flaw? Select two.

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Best answer

Validate and canonicalize the filename on the server, then allow only approved name patterns.

Server-side canonicalization and allowlisting stop attackers from escaping the expected directory structure. Client-side checks are not enough because attackers can modify requests directly. This is the most direct way to prevent traversal sequences from being interpreted as filesystem paths.

B

Best answer

Store uploads outside the web root and deny execution permissions on the upload directory.

Keeping uploads outside the web-accessible path reduces the risk that a file can be executed or directly fetched. Denying execution helps prevent an attacker from turning an upload feature into code execution. This is a strong defense-in-depth control for untrusted files.

C

Distractor review

Increase the maximum upload size so the application can handle more files.

Larger file limits do not stop path traversal or malicious filename manipulation. That change addresses capacity, not input validation. In some cases it could even make abuse worse by allowing larger malicious payloads to be uploaded.

D

Distractor review

Add browser-side JavaScript validation to reject suspicious filenames.

Client-side validation improves user experience, but it is easily bypassed by modifying the request. Attackers do not rely on the browser interface, so server-side validation is still required. This control helps usability, not real security enforcement.

E

Distractor review

Hide detailed error messages from end users only.

Reducing error detail can limit information leakage, but it does not stop traversal attempts. The application would still be vulnerable if it accepts and processes unsafe paths. Error handling is useful, but it is not the main fix for the flaw shown.

Common exam trap

Common exam trap: OSPF can fail even when IP connectivity looks correct

OSPF neighbour formation depends on matching areas, timers, network type, authentication and passive-interface behaviour. Do not choose an answer only because the devices can ping.

Technical deep dive

How to think about this question

OSPF questions usually test the details that control adjacency and route selection. Read the neighbour state, area, router ID and interface configuration before deciding what is wrong.

KKey Concepts to Remember

  • OSPF neighbours must agree on key parameters.
  • Router ID selection can affect neighbour relationships and LSDB output.
  • OSPF cost influences the preferred path.
  • A route can appear in OSPF information but not become the installed route.

TExam Day Tips

  • Check area mismatch first when OSPF adjacency fails.
  • Review passive interfaces when a network is advertised but no neighbour forms.
  • Use show ip ospf neighbor and show ip route clues carefully.

Related practice questions

Related SY0-701 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SY0-701 question test?

OSPF neighbours must agree on key parameters.

What is the correct answer to this question?

The correct answer is: Validate and canonicalize the filename on the server, then allow only approved name patterns. — The right fixes are server-side filename validation and keeping uploaded files outside the executable web directory. Canonicalization and allowlisting prevent traversal strings from being treated as real paths, while a non-web-accessible upload area reduces the chance that an attacker can execute or directly retrieve a malicious file. Together, these controls address both the unsafe input and the risky file placement. Why others are wrong: Bigger upload limits, browser-side checks, and hiding error messages do not remove the core weakness. Those controls may improve usability or reduce noise, but they do not stop an attacker from supplying dangerous path values. The attack succeeds because the server trusts unvalidated input and stores files in a risky location.

What should I do if I get this SY0-701 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.