🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Command Injection and Path Traversal: all 10 questions

Quiz: Command Injection and Path Traversal · Question 7 of 10

Why is removing the text ../ from the input not a reliable fix?

Why is removing the text ../ from the input not a reliable fix?

  1. A.Python cannot remove text from strings
  2. B.Variants like ....// or URL-encoded %2e%2e%2f can still produce ../ after processing
  3. C.It makes valid file names longer
  4. D.It only works on Windows
Answer & explanation

Correct answer: Variants like ....// or URL-encoded %2e%2e%2f can still produce ../ after processing

Check the final normalised path instead of trying to clean the input.

Can you get the rest right without peeking?

Take the timed Quiz: Command Injection and Path Traversal quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →