Sanitize user input: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "{{draft task|Text processing}} "Never trust user input." If the Super Mario Bros. 3 Wrong Warp or https://www.explainxkcd.com/wiki/index.php/Little_Bobby_Tables| Bobby Tabl...")
 
No edit summary
Line 5: Line 5:
;Task:
;Task:
Create a function that takes a list of 20 first and last names, and copies them to a record or struct. The list of names won't be provided here, because exploits like the Bobby Tables one are often language-specific. Try to show an example of a "Bobby Tables" style input in your list of names and how your function prevents it from being executed at runtime.
Create a function that takes a list of 20 first and last names, and copies them to a record or struct. The list of names won't be provided here, because exploits like the Bobby Tables one are often language-specific. Try to show an example of a "Bobby Tables" style input in your list of names and how your function prevents it from being executed at runtime.

;Related tasks
* [[Parametrized SQL statement]]

Revision as of 04:41, 8 September 2021

Sanitize user input is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

"Never trust user input." If the Super Mario Bros. 3 Wrong Warp or [Bobby Tables] have taught programmers anything, it's that user input can be dangerous in unexpected ways.

Task

Create a function that takes a list of 20 first and last names, and copies them to a record or struct. The list of names won't be provided here, because exploits like the Bobby Tables one are often language-specific. Try to show an example of a "Bobby Tables" style input in your list of names and how your function prevents it from being executed at runtime.

Related tasks