Fix style issues in recent security fixes

This commit is contained in:
Johannes Meyer 2022-03-08 15:20:16 +01:00
parent 88294549ba
commit 0d032989e6
3 changed files with 3 additions and 6 deletions

View File

@ -52,8 +52,7 @@ class SshResourceForm extends Form
if ($this->getRequest()->getActionName() != 'editresource') {
$callbackValidator = new Zend_Validate_Callback(function ($value) {
if (
substr(ltrim($value), 0, 7) === 'file://'
if (substr(ltrim($value), 0, 7) === 'file://'
|| openssl_pkey_get_private($value) === false
) {
return false;

View File

@ -49,8 +49,7 @@ class StaticController
$filePath = $assetRoot . DIRECTORY_SEPARATOR . $assetPath;
$dirPath = realpath(dirname($filePath)); // dirname, because the file may be a link
if (
$dirPath === false
if ($dirPath === false
|| substr($dirPath, 0, strlen($assetRoot)) !== $assetRoot
|| ! is_file($filePath)
) {

View File

@ -1194,8 +1194,7 @@ abstract class IdoQuery extends DbQuery
$this->customVars[strtolower($customvar)] = $alias;
if ($type === 'host') {
if (
$this instanceof ServicecommentQuery
if ($this instanceof ServicecommentQuery
|| $this instanceof ServicedowntimeQuery
|| $this instanceof ServicecommenthistoryQuery
|| $this instanceof ServicedowntimestarthistoryQuery