Web Security · Middle · Question 65 of 75

Which Node.js call is most dangerous with user input?

Explanation

exec passes the string to a shell, so ; rm -rf / in the name becomes a command. execFile with an argument array avoids the shell.

Further reading

Problem with a question

Web Security · Middle · question 65

Test yourself

Take the Web Security · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz