From the course: Writing Secure Code in iOS by Infosec

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Input sanitization

Input sanitization

- A lot of folks talk about how you have to sanitize your input. What does that mean? How do we do it? Well, let's take a look. Input sanitization is the act of, in your code, removing or replacing or neutralizing any incoming characters that are potentially harmful. It's a general defense for stopping any number of attacks. If you do it right, it could stop all kinds of attacks that you might not even foresee. Now, it won't catch everything, obviously, but it will catch a lot. It will restrict attacks, make them more difficult to execute against you. And there's a cute little cartoon here that several people have been banding about. You can see it here in this location. And here's mom on the phone with her son's school. "Hi, it's your son's school, we're having trouble." "Oh, dear. What did he break? Did he break something?" "In a way." "Did you really name your son Robert'; DROP TABLE Students; ~~?" "Oh, yes, Little Bobby Tables, we call him. " And the school, "Well, we've lost the…

Contents