Remove code related to magic_quotes_* and register_globals

...they do not exist in PHP 5.4 which we now require.
pull/5284/head^2
Aleksander Machniak 8 years ago
parent 90a6d717ec
commit c3fc072d97

@ -8,10 +8,7 @@ php_value upload_max_filesize 5M
php_value post_max_size 6M
php_value memory_limit 64M
php_flag register_globals Off
php_flag zlib.output_compression Off
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag suhosin.session.encrypt Off
#php_value session.cookie_path /

@ -44,15 +44,12 @@ $ini_checks = array(
'session.auto_start' => 0,
'mbstring.func_overload' => 0,
'suhosin.session.encrypt' => 0,
'magic_quotes_runtime' => 0,
'magic_quotes_sybase' => 0,
);
$optional_checks = array(
// required for utils/modcss.inc, should we require this?
'allow_url_fopen' => 1,
'date.timezone' => '-VALID-',
'register_globals' => 0, // #1489157
);
$source_urls = array(
@ -89,7 +86,7 @@ echo '<input type="hidden" name="_step" value="' . ($RCI->configured ? 3 : 2) .
<h3>Checking PHP version</h3>
<?php
define('MIN_PHP_VERSION', '5.3.7');
define('MIN_PHP_VERSION', '5.4.0');
if (version_compare(PHP_VERSION, MIN_PHP_VERSION, '>=')) {
$RCI->pass('Version', 'PHP ' . PHP_VERSION . ' detected');
} else {

@ -30,8 +30,6 @@ $config = array(
// critical PHP settings here. Only these, which doesn't provide
// an error/warning in the logs later. See (#1486307).
'mbstring.func_overload' => 0,
'magic_quotes_runtime' => false,
'magic_quotes_sybase' => false, // #1488506
);
// check these additional ini settings if not called via CLI

@ -314,11 +314,6 @@ class rcube_utils
return $value;
}
// strip slashes if magic_quotes enabled
if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
$value = stripslashes($value);
}
// remove HTML tags if not allowed
if (!$allow_html) {
$value = strip_tags($value);

@ -21,11 +21,6 @@
$html = stream_get_contents(fopen('php://input', 'r'));
// strip slashes if magic_quotes enabled
if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
$html = stripslashes($html);
}
$params['links'] = (bool) rcube_utils::get_input_value('_do_links', rcube_utils::INPUT_GET);
$params['width'] = (int) rcube_utils::get_input_value('_width', rcube_utils::INPUT_GET);

@ -21,11 +21,6 @@
$text = stream_get_contents(fopen('php://input', 'r'));
// strip slashes if magic_quotes enabled
if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
$html = stripslashes($html);
}
$converter = new rcube_text2html($text, false, array('wrap' => true));
header('Content-Type: text/html; charset=' . RCUBE_CHARSET);

Loading…
Cancel
Save