diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-11-10 11:56:23 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-11-10 11:56:23 -0500 |
commit | 4fe9c2dcf1c90253b2b6a70e67b06c76ff251b35 (patch) | |
tree | de12a5d01033d4ce859e311b743d23b138b3ba12 /etc/inc/util.inc | |
parent | daab67a170ddf38a76605e32a56874780e82b62d (diff) | |
download | pfsense-4fe9c2dcf1c90253b2b6a70e67b06c76ff251b35.zip pfsense-4fe9c2dcf1c90253b2b6a70e67b06c76ff251b35.tar.gz |
* Adding function get_configured_ip_addresses() which returns all interfaces and their configured IP address
* Add checkbox to System -> Advanced -> Admin for HTTP_REFERER checks
* Add and enforce HTTP_REFERER check if checkbox is not checked.
This will prevent HTML pages from crafting HTML GETs against the web interface and will prevent firewall admins from being "tricked" into clicking on links that may be harmful to their firewall.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 0551d40..4b74a7f 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -624,6 +624,21 @@ function get_configured_interface_with_descr($only_opt = false, $withdisabled = return $iflist; } +/* + * get_configured_ip_addresses() - Return a list of all configured + * interfaces IP Addresses + * + */ +function get_configured_ip_addresses() { + require_once("interfaces.inc"); + $ip_array = array(); + $interfaces = get_configured_interface_list(); + foreach($interfaces as $int) { + $ipaddr = get_interface_ip($int); + $ip_array[$int] = $ipaddr; + } + return $ip_array; +} /* * get_interface_list() - Return a list of all physical interfaces |