Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into phpunit

* master:
  added option to disable reverse DNS lookups
  • Loading branch information...
commit 3891d3ec0d32f09040f0c0a13889c01db23783ae 2 parents f77b4d4 + 22ef1e3
@splitbrain splitbrain authored
View
1  conf/dokuwiki.php
@@ -158,6 +158,7 @@
$conf['readdircache'] = 0; //time cache in second for the readdir operation, 0 to deactivate.
/* Network Settings */
+$conf['dnslookups'] = 1; //disable to disallow IP to hostname lookups
// Proxy setup - if your Server needs a proxy to access the web set these
$conf['proxy']['host'] = '';
$conf['proxy']['port'] = '';
View
5 inc/common.php
@@ -676,10 +676,15 @@ function clientismobile(){
/**
* Convert one or more comma separated IPs to hostnames
*
+ * If $conf['dnslookups'] is disabled it simply returns the input string
+ *
* @author Glen Harris <astfgl@iamnota.org>
* @returns a comma separated list of hostnames
*/
function gethostsbyaddrs($ips){
+ global $conf;
+ if(!$conf['dnslookups']) return $ips;
+
$hosts = array();
$ips = explode(',',$ips);
View
3  lib/plugins/config/lang/en/lang.php
@@ -177,6 +177,9 @@
$lang['renderer__core'] = '%s (dokuwiki core)';
$lang['renderer__plugin'] = '%s (plugin)';
+/* Network Options */
+$lang['dnslookups'] = 'DokuWiki will lookup hostnames for remote IP addresses of users editing pages. If you have a slow or non working DNS server or don\'t want this feature, disable this option';
+
/* Proxy Options */
$lang['proxy____host'] = 'Proxy servername';
$lang['proxy____port'] = 'Proxy port';
View
1  lib/plugins/config/settings/config.metadata.php
@@ -207,6 +207,7 @@
$meta['readdircache'] = array('numeric');
$meta['_network'] = array('fieldset');
+$meta['dnslookups'] = array('onoff');
$meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i');
$meta['proxy____port'] = array('numericopt');
$meta['proxy____user'] = array('string');
Please sign in to comment.
Something went wrong with that request. Please try again.