|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-02-17 12:03 UTC] nikic@php.net
-Status: Open
+Status: Wont fix
-Package: Feature/Change Request
+Package: *General Issues
[2013-02-17 12:03 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 21:00:01 2025 UTC |
Description: ------------ I would like to propose a solution that will allow to test whether $_SERVER (or similar ) predefined variables have been changed since PHP initialized them. string predefinedVarHash(string predefinedVar) PHP at runtime, after variables have been initialized/loaded, would store the serialized hash of the predefined variable that could be later retrieved by the above function. Reproduce code: --------------- e.g. <?php $md5Hash = predefinedVarHash("SERVER"); if ($md5Hash !== md5(serialize($_SERVER))) die('$_SERVER changed'); else echo '$_SERVER has not been changed'; ?> Expected result: ---------------- This would allow us to validate the information stored in the variable, while still allowing us to legitimately change the value of $_SERVER or other predefind variables.