mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-25 16:00:22 +01:00
Merge branch 'master' of https://github.com/ctrlcctrlv/8chan
This commit is contained in:
commit
116a1278d8
@ -66,7 +66,10 @@
|
||||
// Use `host` via shell_exec() to lookup hostnames, avoiding query timeouts. May not work on your system.
|
||||
// Requires safe_mode to be disabled.
|
||||
$config['dns_system'] = false;
|
||||
|
||||
|
||||
// Check validity of the reverse DNS of IP addresses. Highly recommended.
|
||||
$config['fcrdns'] = true;
|
||||
|
||||
// When executing most command-line tools (such as `convert` for ImageMagick image processing), add this
|
||||
// to the environment path (seperated by :).
|
||||
$config['shell_path'] = '/usr/local/bin';
|
||||
|
@ -2267,6 +2267,12 @@ function rDNS($ip_addr) {
|
||||
$host = $ip_addr;
|
||||
}
|
||||
|
||||
$isip = filter_var($host, FILTER_VALIDATE_IP);
|
||||
|
||||
if ($config['fcrdns'] && !$isip && DNS($host) != $ip_addr) {
|
||||
$host = $ip_addr;
|
||||
}
|
||||
|
||||
if ($config['cache']['enabled'])
|
||||
cache::set('rdns_' . $ip_addr, $host);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user