diff options
author | jim-p <jimp@pfsense.org> | 2013-07-02 16:56:58 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-07-02 16:58:34 -0400 |
commit | c49b7c50afa5b6393b93acc88d5d47d5a108664f (patch) | |
tree | 6a42170bd5ee487fb6d2bc5380919d9b990b7a1c /etc/inc | |
parent | b54ffacc756d39f6d03f287bbc9ab3ccd70793c0 (diff) | |
download | pfsense-c49b7c50afa5b6393b93acc88d5d47d5a108664f.zip pfsense-c49b7c50afa5b6393b93acc88d5d47d5a108664f.tar.gz |
Include both dyndns and rfc2136 hosts in referer check
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/auth.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 67451a2..a70db8e 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -130,6 +130,7 @@ if(function_exists("display_error_form") && !isset($config['system']['webgui'][' if(strcasecmp($referrer_host, $config['system']['hostname'] . "." . $config['system']['domain']) == 0 || strcasecmp($referrer_host, $config['system']['hostname']) == 0) $found_host = true; + if(!empty($config['system']['webgui']['althostnames']) && !$found_host) { $althosts = explode(" ", $config['system']['webgui']['althostnames']); foreach ($althosts as $ah) { @@ -139,6 +140,21 @@ if(function_exists("display_error_form") && !isset($config['system']['webgui'][' } } } + + if(is_array($config['dyndnses']['dyndns']) && !$found_host) + foreach($config['dyndnses']['dyndns'] as $dyndns) + if(strcasecmp($dyndns['host'], $referrer_host) == 0) { + $found_host = true; + break; + } + + if(is_array($config['dnsupdates']['dnsupdate']) && !$found_host) + foreach($config['dnsupdates']['dnsupdate'] as $rfc2136) + if(strcasecmp($rfc2136['host'], $referrer_host) == 0) { + $found_host = true; + break; + } + if(!$found_host) { $interface_list_ips = get_configured_ip_addresses(); foreach($interface_list_ips as $ilips) { |