Verification data of PHP security knowledge. Your users may be excellent, and most users may use the application as expected. However, as long as the input opportunity is provided, it is very likely that you will be very good at learning your users, and most users may use the application as expected. However, as long as the input opportunity is provided, there may be very bad input. As an application developer, you must prevent the application from receiving incorrect input. Careful consideration of the locations and correct values entered by the user will allow you to build a robust and secure application.
The following lists general verification tips for various verification data:
Use values in the whitelist
Always reverify limited options
Use built-in escape functions
Verify the correct data type (such as numbers)
The value (White-listed value) in the whitelist is the correct value, which is opposite to the invalid Black-listed value. The difference between the two is that when verifying data, the list or range of possible values is smaller than the list or range of invalid values, many of which may be unknown values or unexpected values.
When verifying data to ensure PHP Security, remember that it is generally easier to design and verify the value that the application allows to use than to prevent all unknown values. For example, to limit the field value to all numbers, you need to write a routine to ensure that all input values are numbers. Do not compile a routine that is used to search for non-numeric values and is marked as invalid when a non-numeric value is found.
Your users may be excellent, and most users may use the application as expected. However, as long as the input opportunity is provided, it is very likely that...