Identifying Safe $_SERVER Variables
Attackers can exploit variables that users can control, rendering them unsafe or "tainted." This article aims to provide a comprehensive list of $_SERVER variables and their respective safety levels.
Server Controlled
These variables are set by the server and are unaffected by user input:
Partly Server Controlled
These variables depend on the client's request but have limited valid values, making them reliable:
Entirely Arbitrary User Controlled
These variables are vulnerable to user manipulation:
Environment Variables
The safety of environment variables depends on their source. They can range from completely server controlled to completely user controlled.
The above is the detailed content of Which $_SERVER Variables Are Safe to Use in PHP?. For more information, please follow other related articles on the PHP Chinese website!