From the course: Ten Security Tips for Developers
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Field verification
From the course: Ten Security Tips for Developers
Field verification
- [Instructor] We talked about verifying and sanitizing data in the previous chapter. I want to focus in on these processes in more detail, because there's some interesting challenges and pitfalls along the way, since most of the code that we're working with is publicly available code. The example I'm showing you here is of a website form, but the overhanging principles are universal to any digital data collection and storage system with a front end and a back end. This form is part of a larger app for displaying weather data for any location on earth, and the form input is the location itself. It has a very specific pattern required by the API we're sending information to. It has to be a city name, comma, and then no space, either a two-letter country key, or if in the case of the United States, a two-letter state key, followed by comma, followed by a two letter country key. This data is passed onto a weather API that…