Validating data
Next, we are going to take our first glimpse at the security-related topics in this book. We cover additional concepts later, in Chapter 7, Dealing with Security Concerns. However, this is not a security book. Unfortunately, there is too much material to be able to cover it all in this book. There are too many risks and too many potential mitigation measures for our one chapter dedicated to security. Therefore, instead, we will touch upon the concepts generally for those who are unfamiliar with them, and then show several ways to combat the issues in Sanic.
The first of those topics is data validation. If you have been around the web, you will understand what I am saying, and the why will be obvious to you. You are concerned with SQL injection attacks or XSS attacks. You know the potential threats posed by blindly accepting data and acting upon it. I trust that you already know this is a big no-no and are here to learn how to implement standard practices in Sanic...