diff --git a/inc/api.php b/inc/api.php index 4127576a..434c3439 100644 --- a/inc/api.php +++ b/inc/api.php @@ -209,7 +209,7 @@ class Api { return $apiCatalog; } - public function translateBoard(Board $board) { + public function translateBoard($board) { $apiBoard = []; foreach ($boards as $board) { diff --git a/inc/image.php b/inc/image.php index 840c9004..cab5bb13 100644 --- a/inc/image.php +++ b/inc/image.php @@ -250,7 +250,7 @@ class ImageConvert extends ImageBase { if ($size = @getimagesize($src)) return $size; } - $size = shell_exec_error(($this->gm ? 'gm ' : '') . 'identify -format "%w %h" ' . escapeshellarg($src . '[0]')); + $size = shell_exec_error(($this->gm ? 'gm ' : 'magick ') . 'identify -format "%w %h" ' . escapeshellarg($src . '[0]')); if (preg_match('/^(\d+) (\d+)$/', $size, $m)) return array($m[1], $m[2]); return false; @@ -276,13 +276,13 @@ class ImageConvert extends ImageBase { if (!$this->temp) { if ($config['strip_exif']) { - if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . escapeshellarg($this->src) . ' -auto-orient -strip ' . escapeshellarg($src))) { $this->destroy(); error(_('Failed to redraw image!'), null, $error); } } else { - if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . escapeshellarg($this->src) . ' -auto-orient ' . escapeshellarg($src))) { $this->destroy(); error(_('Failed to redraw image!'), null, $error); @@ -329,7 +329,7 @@ class ImageConvert extends ImageBase { } else { $convert_args = &$config['convert_args']; - if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if (($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . sprintf($convert_args, $this->width, $this->height, @@ -348,7 +348,7 @@ class ImageConvert extends ImageBase { } else { $convert_args = &$config['convert_args']; - if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if (($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . sprintf($convert_args, $this->width, $this->height, diff --git a/inc/mod/pages.php b/inc/mod/pages.php index a3276702..97dc4711 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -57,6 +57,9 @@ function mod_login(Context $ctx, $redirect = false) { // Check if inputs are set and not empty if (!isset($_POST['username'], $_POST['password']) || $_POST['username'] == '' || $_POST['password'] == '') { $args['error'] = $config['error']['invalid']; + } + elseif (strlen($_POST['password']) > 128 || strlen($_POST['username']) > 128) { + $args['error'] = $config['error']['infotoolong']; } elseif (!login($_POST['username'], $_POST['password'])) { if ($config['syslog']) _syslog(LOG_WARNING, 'Unauthorized login attempt!'); diff --git a/install.php b/install.php index a2f6f3a5..d1b5cb43 100644 --- a/install.php +++ b/install.php @@ -1,7 +1,7 @@