aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install
diff options
context:
space:
mode:
authorDerky <derky@phpbb.com>2018-10-23 23:51:55 +0200
committerDerky <derky@phpbb.com>2018-10-23 23:57:24 +0200
commitd753351edc04a45c61411ee09607fb932d314617 (patch)
tree786d721e1cfac4866705114494982a2e45bcd467 /phpBB/phpbb/install
parentae6c3b0d34c662f107fb7cb8d9e26e5bd252a3b3 (diff)
downloadforums-d753351edc04a45c61411ee09607fb932d314617.tar
forums-d753351edc04a45c61411ee09607fb932d314617.tar.gz
forums-d753351edc04a45c61411ee09607fb932d314617.tar.bz2
forums-d753351edc04a45c61411ee09607fb932d314617.tar.xz
forums-d753351edc04a45c61411ee09607fb932d314617.zip
[ticket/security/227] Replace ImageMagick support with thumbnail event
SECURITY-227
Diffstat (limited to 'phpBB/phpbb/install')
-rw-r--r--phpBB/phpbb/install/module/install_database/task/add_config_settings.php4
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_imagick_path.php89
2 files changed, 0 insertions, 93 deletions
diff --git a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php
index 54114e3f9c..ba439609ff 100644
--- a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php
+++ b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php
@@ -151,10 +151,6 @@ class add_config_settings extends \phpbb\install\task_base
VALUES ('default_lang', '" . $this->db->sql_escape($this->install_config->get('default_lang')) . "')",
'UPDATE ' . $this->config_table . "
- SET config_value = '" . $this->db->sql_escape($this->install_config->get('img_imagick')) . "'
- WHERE config_name = 'img_imagick'",
-
- 'UPDATE ' . $this->config_table . "
SET config_value = '" . $this->db->sql_escape($this->install_config->get('server_name')) . "'
WHERE config_name = 'server_name'",
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_imagick_path.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_imagick_path.php
deleted file mode 100644
index 377d96ed1a..0000000000
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_imagick_path.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-/**
- *
- * This file is part of the phpBB Forum Software package.
- *
- * @copyright (c) phpBB Limited <https://www.phpbb.com>
- * @license GNU General Public License, version 2 (GPL-2.0)
- *
- * For full copyright and license information, please see
- * the docs/CREDITS.txt file.
- *
- */
-
-namespace phpbb\install\module\obtain_data\task;
-
-class obtain_imagick_path extends \phpbb\install\task_base implements \phpbb\install\task_interface
-{
- /**
- * @var \phpbb\install\helper\config
- */
- protected $config;
-
- /**
- * Constructor
- *
- * @param \phpbb\install\helper\config $config Installer's config
- */
- public function __construct(\phpbb\install\helper\config $config)
- {
- $this->config = $config;
-
- parent::__construct(true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function run()
- {
- // Can we find ImageMagick anywhere on the system?
- $exe = (DIRECTORY_SEPARATOR == '\\') ? '.exe' : '';
-
- $magic_home = getenv('MAGICK_HOME');
- $img_imagick = '';
- if (empty($magic_home))
- {
- $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
- $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
-
- $locations = array_merge($path_locations, $locations);
- foreach ($locations as $location)
- {
- // The path might not end properly, fudge it
- if (substr($location, -1, 1) !== '/')
- {
- $location .= '/';
- }
-
- if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
- {
- $img_imagick = str_replace('\\', '/', $location);
- continue;
- }
- }
- }
- else
- {
- $img_imagick = str_replace('\\', '/', $magic_home);
- }
-
- $this->config->set('img_imagick', $img_imagick);
- }
-
- /**
- * {@inheritdoc}
- */
- static public function get_step_count()
- {
- return 0;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get_task_lang_name()
- {
- return '';
- }
-}