.. _structures-nohardcodedip: .. _no-hardcoded-ip: No Hardcoded Ip +++++++++++++++ Do not leave hard coded IP in your code. It is recommended to move such configuration in external files or databases, for each update. This may also come handy when testing. ``127.0.0.1``, ``\:\:1`` and ``\:\:0`` are omitted, and not considered as a violation. .. code-block:: php See also `Use of Hardcoded IPv4 Addresses `_ and `Never hard code sensitive information `_. Connex PHP features ------------------- + `ip `_ Suggestions ___________ * Move the hardcoded IP to an external source : environment variable, configuration file, database. * Remove the hardcoded IP and ask for it at execution. * Use a literal value for default messages in form. Specs _____ +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/NoHardcodedIp | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`Security ` | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Slow (1 hour) | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-openemr-structures-nohardcodedip`, :ref:`case-nextcloud-structures-nohardcodedip` | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------+