← 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?
- A.Python cannot remove text from strings
- B.Variants like ....// or URL-encoded %2e%2e%2f can still produce ../ after processing
- C.It makes valid file names longer
- 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 →