[UPHPU] never trust data

Wade Preston Shearer wadeshearer.lists at me.com
Wed May 25 09:36:20 MDT 2011


We all know that you should never trust data—but the conversation usually centers around not trusting data from users. I just had an experience where I have a script where I was pulling data from one MySQL table and inserting it into another and encountered an error and thought I'd throw out a reminder to never trust data from yourself either. Data that should have been a certain way had an anomaly in it that caused the insert to fail. So, never trust data—always validate/cleans it to ensure that it is in the correct format, of the correct type, or exists before inserting into the database.


More information about the UPHPU mailing list