display_error_form("501",sprintf(gettext("A potential %sDNS Rebind attack%s has been detected.%sTry to access the router by IP address instead of by hostname."),'<a href="http://en.wikipedia.org/wiki/DNS_rebinding">','</a>','<br />'));
exit;
}
$security_passed=false;
}
/* DNS ReBinding attack prevention */
$found_host=false;
/* Either a IPv6 address with or without a alternate port */
display_error_form("501",sprintf(gettext("A potential %sDNS Rebind attack%s has been detected.%sTry to access the router by IP address instead of by hostname."),'<a href="http://en.wikipedia.org/wiki/DNS_rebinding">','</a>','<br />'));
exit;
}
$security_passed=false;
}
}
// If the HTTP_REFERER is something other than ourselves then disallow.
// allow SSH port forwarded connections and links from localhost
$found_host=true;
}
}
}
if($found_host==false){
if(!security_checks_disabled()){
display_error_form("501","An HTTP_REFERER was detected other than what is defined in System -> Advanced (".htmlspecialchars($_SERVER['HTTP_REFERER'])."). You can disable this check if needed in System -> Advanced -> Admin.");
// allow SSH port forwarded connections and links from localhost
$found_host=true;
}
}
}
if($found_host==false){
if(!security_checks_disabled()){
display_error_form("501","An HTTP_REFERER was detected other than what is defined in System -> Advanced (".htmlspecialchars($_SERVER['HTTP_REFERER'])."). You can disable this check if needed in System -> Advanced -> Admin.");