aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/index.php14
-rw-r--r--phpBB/includes/functions_upload.php2
2 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 4c568cf441..92bcf90039 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -432,6 +432,20 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
{
$error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
}
+
+ if (strpos($config_name, '_max') !== false)
+ {
+ // Min/max pairs of settings should ensure that min <= max
+ // Replace _max with _min to find the name of the minimum
+ // corresponding configuration variable
+ $min_name = str_replace('_max', '_min', $config_name);
+
+ if (isset($cfg_array[$min_name]) && is_numeric($cfg_array[$min_name]) && $cfg_array[$config_name] < $cfg_array[$min_name])
+ {
+ // A minimum value exists and the maximum value is less than it
+ $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], (int) $cfg_array[$min_name]);
+ }
+ }
break;
// Absolute path
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index eeb90049e6..983ccdfc82 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -976,7 +976,7 @@ class fileupload
/**
- * Check for allowed extension
+ * Check for bad content (IE mime-sniffing)
*/
function valid_content(&$file)
{