Skip to content
Commits on Source (6)
......@@ -7,9 +7,28 @@ php:
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- nightly
env:
- CHECK=phpunit
matrix:
include:
- env: CHECK=phpcs
php: '7.3'
- env: CHECK=phpcs
php: '7.0'
- env: CHECK=phpcs
php: '5.6'
- env: CHECK=syntax
php: 'nightly'
- env: CHECK=syntax
php: '7.3'
- env: CHECK=syntax
php: '7.0'
- env: CHECK=syntax
php: '5.6'
allow_failures:
- php: nightly
......@@ -32,12 +51,13 @@ notifications:
# also see: test/setup_vendor.sh
before_script:
- php -m
- sh -c '[ -z $LOCALE_GEN ] || sudo locale-gen en_US.UTF-8 de_DE.UTF-8 fr_FR.UTF-8'
- sh -c '[ -z $ENABLE_LDAP ] || phpenv config-add test/travis-ldap.ini'
- test/travis_database.sh
- '[ -z $LOCALE_GEN ] || sudo locale-gen en_US.UTF-8 de_DE.UTF-8 fr_FR.UTF-8'
- '[ -z $ENABLE_LDAP ] || phpenv config-add test/travis-ldap.ini'
- test/setup_vendor.sh
- 'if [ "$CHECK" = phpunit ]; then test/travis_database.sh; fi'
script:
# also see: modules/test/application/clicommands/PhpCommand.php
- php phpcs.phar
- php phpunit.phar -c modules/test/phpunit.xml --verbose
- 'if [ "$CHECK" = phpcs ]; then php vendor/phpcs.phar; fi'
- 'if [ "$CHECK" = phpunit ]; then php vendor/phpunit.phar -c modules/test/phpunit.xml --verbose; fi'
- 'if [ "$CHECK" = syntax ]; then php test/check-syntax.php -e "^(\./)?vendor/" -e Icinga/Util/String.php; fi'
......@@ -4,6 +4,68 @@ Please make sure to always read our [Upgrading](doc/80-Upgrading.md) documentati
## What's New
### What's New in Version 2.6.3
You can find issues related to this release on our [Roadmap](https://github.com/Icinga/icingaweb2/milestone/54?closed=1).
#### PHP 7.3
Now supported. :tada:
#### LDAP - One part of our framework we'd want to NOT touch very often
That's especially the case if it's about establishing a connection. With the help of our users we've finally fixed the
issue that defining multiple hostnames and enabling STARTTLS has never properly worked. Also, they've identified that
defining multiple hostnames caused a customized port not being utilized and fixed it themselves.
There has also a rare case been fixed that caused no group members being found in case object classes had a different
casing than what we expected. (Good news for all the non-OpenLdap and non-MSActiveDirectory users)
* LDAP connection fails with multiple servers using STARTTLS [#3639](https://github.com/Icinga/icingaweb2/issues/3639)
* LDAPS authentication ignores custom port setting [#3713](https://github.com/Icinga/icingaweb2/issues/3713)
* LDAP group members not found [#3650](https://github.com/Icinga/icingaweb2/issues/3650)
#### We take care about your data even better now
With this are newlines and HTML entities (such as ` `) in plugin output and custom variables meant.
Sorry if I've teased some data security folks now. :innocent:
* Newlines in plugin output disappear [#3662](https://github.com/Icinga/icingaweb2/issues/3662)
* Windows path separators are converted to newlines in custom variables [#3636](https://github.com/Icinga/icingaweb2/issues/3636)
* HTML entities in plugin output are not resolved if no other HTML is there [#3707](https://github.com/Icinga/icingaweb2/issues/3707)
#### You've wondered how you got into a famous blue police box?
Don't worry, not only you and the european union are sometimes unsure what's the correct time.
* Set client timezone on DB connection [#3525](https://github.com/Icinga/icingaweb2/issues/3525)
* Ensure a valid default timezone is set in any case [#3747](https://github.com/Icinga/icingaweb2/pull/3747)
* Fix that the event detail view is not showing times in correct timezone [#3660](https://github.com/Icinga/icingaweb2/pull/3660)
#### UI - The portal to your monitoring environment, improved
The collapsible sidebar introduced with v2.5 has been plagued by some issues since then. They're now fixed. Also,
the UI should now flicker less and properly preserve the scroll position when interacting with action links. (This
also allows the business process module to behave more stable when using drag and drop in large configurations.)
* Collapsible Sidebar Issues [#3187](https://github.com/Icinga/icingaweb2/issues/3187)
* Fix title when closing right column [#3654](https://github.com/Icinga/icingaweb2/issues/3654)
* Preserve scroll position upon form submits [#3661](https://github.com/Icinga/icingaweb2/pull/3661)
#### Corrected things we've broke recently
That's due to preemptive changes to protect you from bad individuals. Unfortunately this meant that some unforeseen
side-effects appeared after the release of v2.6.2. These are now fixed.
* Multiline values in ini files broken [#3705](https://github.com/Icinga/icingaweb2/issues/3705)
* PHP ini parser doesn't strip trailing whitespace [#3733](https://github.com/Icinga/icingaweb2/issues/3733)
* Escaped characters in INI values are not unescaped [#3648](https://github.com/Icinga/icingaweb2/issues/3648)
Though, if you've faced issue [#3705](https://github.com/Icinga/icingaweb2/issues/3705) you still need to take manual
action (if not already done) as the provided fix does only prevent further occurrences of the resulting error. The
required changes involve the transformation of all real newlines in Icinga Web 2's INI files to literal `\n` or `\r\n`
sequences. (Files likely having such are the `roles.ini` and `announcements.ini`)
### What's New in Version 2.6.2
You can find issues and features related to this release on our [Roadmap](https://github.com/Icinga/icingaweb2/milestone/53?closed=1).
......
63cb9d728338225833884fda2c312a5a9f431fd6 2018-11-21 09:19:00 +0100
78d215ce36b9d2b64d8998a15fa80c1d46ef9ec4 2019-04-24 14:36:40 +0200
......@@ -52,7 +52,11 @@ class StaticController extends Controller
return;
}
$img = file_get_contents('http://www.gravatar.com/avatar/' . $filename . '?s=120&d=mm');
$img = @file_get_contents('http://www.gravatar.com/avatar/' . $filename . '?s=120&d=mm');
if ($img === false) {
$this->httpNotFound('Unable to connect to gravatar.com');
}
$cache->store($cacheFile, $img);
$response->setHeader('ETag', sprintf('"%s"', $cache->etagForCachedFile($cacheFile)));
......
......@@ -48,38 +48,7 @@ class LdapResourceForm extends Form
'The hostname or address of the LDAP server to use for authentication.'
. ' You can also provide multiple hosts separated by a space'
),
'value' => 'localhost',
'validators' => array(
array(
'Callback',
false,
array(
'callback' => function ($v) {
$withoutScheme = $withScheme = false;
foreach (explode(' ', $v) as $uri) {
if (preg_match('~^(?<!://)[^:]+:\d+$~', $uri)) {
return false;
}
$url = Url::fromPath($uri);
if ($url->getScheme()) {
$withScheme = true;
} else {
$withoutScheme = true;
}
}
return $withScheme ^ $withoutScheme;
},
'messages' => array(
'callbackValue' => $this->translate(
'A protocol scheme such as ldap:// or ldaps:// is mandatory for URIs with a given'
. ' port and for all other URIs as well once a scheme is given for a single one.'
)
)
)
)
)
'value' => 'localhost'
)
);
$this->addElement(
......
......@@ -4,6 +4,7 @@
namespace Icinga\Forms;
use Exception;
use Icinga\Exception\ConfigurationError;
use Zend_Form_Decorator_Abstract;
use Icinga\Application\Config;
use Icinga\Web\Form;
......@@ -99,6 +100,10 @@ class ConfigForm extends Form
{
try {
$this->writeConfig($this->config);
} catch (ConfigurationError $e) {
$this->addError($e->getMessage());
return false;
} catch (Exception $e) {
$this->addDecorator('ViewScript', array(
'viewModule' => 'default',
......
......@@ -46,6 +46,17 @@ class DashletForm extends Form
$panes = $this->dashboard->getPaneKeyTitleArray();
}
$sectionNameValidator = ['Callback', true, [
'callback' => function ($value) {
if (strpos($value, '[') === false && strpos($value, ']') === false) {
return true;
}
},
'messages' => [
'callbackValue' => $this->translate('Brackets ([, ]) cannot be used here')
]
]];
$this->addElement(
'hidden',
'org_pane',
......@@ -80,7 +91,8 @@ class DashletForm extends Form
array(
'required' => true,
'label' => $this->translate('Dashlet Title'),
'description' => $this->translate('Enter a title for the dashlet.')
'description' => $this->translate('Enter a title for the dashlet.'),
'validators' => [$sectionNameValidator]
)
);
$this->addElement(
......@@ -109,7 +121,8 @@ class DashletForm extends Form
array(
'required' => true,
'label' => $this->translate('New Dashboard Title'),
'description' => $this->translate('Enter a title for the new dashboard')
'description' => $this->translate('Enter a title for the new dashboard'),
'validators' => [$sectionNameValidator]
)
);
} else {
......
......@@ -85,6 +85,7 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
<script type="text/javascript" src="<?= $this->href($jsfile) ?>"></script>
<!--<![endif]-->
<script type="text/javascript">
window.name = '<?= $this->protectId('Icinga') ?>';
var icinga = new Icinga({
baseUrl: '<?= $this->baseUrl(); ?>'
});
......
icingaweb2 (2.6.3-1~exp1) experimental; urgency=medium
* Team upload.
* New upstream release.
* Drop patches, applied/included upstream.
* Add php-cli dependency to icingaweb2-common for check-syntax.php.
-- Bas Couwenberg <sebastic@debian.org> Thu, 25 Apr 2019 05:59:55 +0200
icingaweb2 (2.6.2-3) unstable; urgency=medium
* Team upload.
......
......@@ -45,6 +45,7 @@ Description: simple and responsive web interface for Icinga
Package: icingaweb2-common
Architecture: all
Depends: adduser,
php-cli,
php-icinga (= ${source:Version}),
${misc:Depends}
Breaks: icingaweb2 (<< 2.1.2-2~)
......
Description: GridChart: Fix compatibility issues with PHP 7.3
Author: Markus Frosch <markus.frosch@icinga.com>
Origin: https://github.com/Icinga/icingaweb2/pull/3637/commits/ecfaf7cedef6801f837dbb082ad420bad98069cc
--- a/library/Icinga/Chart/GridChart.php
+++ b/library/Icinga/Chart/GridChart.php
@@ -409,7 +409,7 @@ class GridChart extends Chart
);
break;
default:
- continue;
+ continue 2;
}
$el = $this->setupGraph($graphObj, $graph);
if ($el) {
Description: Use continue <N> in case statements to fix ErrorException with PHP 7.3.
Fatal error: Uncaught ErrorException: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Author: Bas Couwenberg <sebastic@debian.org>
Bug-Debian: https://bugs.debian.org/914457
Forwarded: https://github.com/Icinga/icingaweb2/pull/3634
Applied-Upstream: https://github.com/Icinga/icingaweb2/commit/8ebf53558093c631402e8e3565b99af3b29a7373
--- a/library/Icinga/Application/Modules/Module.php
+++ b/library/Icinga/Application/Modules/Module.php
@@ -686,7 +686,7 @@ class Module
case 'depends':
if (strpos($val, ' ') === false) {
$metadata->depends[$val] = true;
- continue;
+ continue 2;
}
$parts = preg_split('/,\s+/', $val);
--- a/library/Icinga/File/Ini/IniParser.php
+++ b/library/Icinga/File/Ini/IniParser.php
@@ -64,7 +64,7 @@ class IniParser
switch ($state) {
case self::LINE_START:
if (ctype_space($s)) {
- continue;
+ continue 2;
}
switch ($s) {
case '[':
@@ -130,7 +130,7 @@ class IniParser
case self::DIRECTIVE_VALUE_START:
if (ctype_space($s)) {
- continue;
+ continue 2;
} elseif ($s === '"') {
$state = self::DIRECTIVE_VALUE_QUOTED;
} else {
break-continue.patch
vendor-Update-zf1-for-PHP-7.3.patch
vendor-Update-JShrink-to-1.3.1.patch
GridChart-Fix-compatibility-issues-with-PHP-7.3.patch
vendor-Update-dompdf-to-a-fixed-version-for-PHP-7.3.patch
Description: vendor: Update JShrink to 1.3.1
This fixes mainly problems with PHP 7.3.
Author: Markus Frosch <markus.frosch@icinga.com>
Origin: https://github.com/Icinga/icingaweb2/pull/3637/commits/87e81e6b3ae87d30a975ed193531d3f483932a5b
--- a/library/vendor/JShrink/Minifier.php
+++ b/library/vendor/JShrink/Minifier.php
@@ -183,7 +183,7 @@ class Minifier
// new lines
case "\n":
// if the next line is something that can't stand alone preserve the newline
- if (strpos('(-+[@', $this->b) !== false) {
+ if ($this->b !== false && strpos('(-+[@', $this->b) !== false) {
echo $this->a;
$this->saveString();
break;
@@ -231,7 +231,7 @@ class Minifier
// check for some regex that breaks stuff
if ($this->a === '/' && ($this->b === '\'' || $this->b === '"')) {
$this->saveRegex();
- continue;
+ continue 3;
}
echo $this->a;
@@ -274,9 +274,8 @@ class Minifier
if (isset($this->c)) {
$char = $this->c;
unset($this->c);
-
- // Otherwise we start pulling from the input.
} else {
+ // Otherwise we start pulling from the input.
$char = substr($this->input, $this->index, 1);
// If the next character doesn't exist return false.
@@ -459,11 +458,8 @@ class Minifier
echo $this->a;
// Loop until the string is done
- while (true) {
-
- // Grab the very next character and load it into a
- $this->a = $this->getChar();
-
+ // Grab the very next character and load it into a
+ while (($this->a = $this->getChar()) !== false) {
switch ($this->a) {
// If the string opener (single or double quote) is used
--- a/library/vendor/JShrink/SOURCE
+++ b/library/vendor/JShrink/SOURCE
@@ -1,4 +1,7 @@
-curl https://codeload.github.com/tedious/JShrink/tar.gz/v1.3.0 -o JShrink-1.3.0.tar.gz
-tar xzf JShrink-1.3.0.tar.gz --strip-components 1 JShrink-1.3.0/LICENSE
-tar xzf JShrink-1.3.0.tar.gz --strip-components 3 JShrink-1.3.0/src/JShrink/Minifier.php
-rm JShrink-1.3.0.tar.gz
+#!/bin/bash
+set -eux
+VERSION=1.3.1
+curl -LsS https://github.com/tedious/JShrink/archive/v"$VERSION".tar.gz -o /tmp/JShrink.tar.gz
+tar xzf /tmp/JShrink.tar.gz --strip-components 1 JShrink-"$VERSION"/LICENSE
+tar xzf /tmp/JShrink.tar.gz --strip-components 3 JShrink-"$VERSION"/src/JShrink/Minifier.php
+rm /tmp/JShrink.tar.gz
Description: vendor: Update dompdf to a fixed version for PHP 7.3
https://github.com/dompdf/dompdf/pull/1854
Author: Markus Frosch <markus.frosch@icinga.com>
Origin: https://github.com/Icinga/icingaweb2/pull/3637/commits/f4f61dff5b601b0964d457b9c90b94132dea5d02
--- a/library/vendor/dompdf/SOURCE
+++ b/library/vendor/dompdf/SOURCE
@@ -1,16 +1,26 @@
-GLOBIGNORE=$0; rm -rf *
+#!/bin/bash
+set -eux
+#GLOBIGNORE=$0; rm -rf *
-curl https://codeload.github.com/dompdf/dompdf/tar.gz/v0.8.2 -o dompdf-0.8.2.tar.gz
-tar xzf dompdf-0.8.2.tar.gz --strip-components 1 dompdf-0.8.2/{lib,src,LICENSE.LGPL}
-rm dompdf-0.8.2.tar.gz
+#DOMPDF_VERSION=0.8.2
+DOMPDF_VERSION=6a77a427984f97743018ace3e095fbf0edaaee29 # https://github.com/dompdf/dompdf/pull/1854
+
+PHP_FONTLIB_VERSION=0.5.1
+PHP_SVGLIB_VERSION=0.3.2
+
+rm -rf lib/ src/
+
+curl -LsS https://github.com/dompdf/dompdf/archive/"$DOMPDF_VERSION".tar.gz -o /tmp/dompdf.tar.gz
+tar xf /tmp/dompdf.tar.gz --strip-components 1 dompdf-"$DOMPDF_VERSION"/{lib,src,LICENSE.LGPL}
+rm /tmp/dompdf.tar.gz
mv LICENSE.LGPL LICENSE
-curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.5.1 -o php-font-lib-0.5.1.tar.gz
-mkdir -p lib/php-font-lib
-tar xzf php-font-lib-0.5.1.tar.gz --strip-components 1 -C lib/php-font-lib php-font-lib-0.5.1/{src,LICENSE}
-rm php-font-lib-0.5.1.tar.gz
-
-curl https://codeload.github.com/PhenX/php-svg-lib/tar.gz/v0.3.2 -o php-svg-lib-0.3.2.tar.gz
-mkdir -p lib/php-svg-lib
-tar xzf php-svg-lib-0.3.2.tar.gz --strip-components 1 -C lib/php-svg-lib php-svg-lib-0.3.2/src
-rm php-svg-lib-0.3.2.tar.gz
+curl -LsS https://github.com/PhenX/php-font-lib/archive/"$PHP_FONTLIB_VERSION".tar.gz -o /tmp/php-font-lib.tar.gz
+[ -d lib/php-font-lib ] || mkdir -p lib/php-font-lib
+tar xf /tmp/php-font-lib.tar.gz --strip-components 1 -C lib/php-font-lib php-font-lib-"$PHP_FONTLIB_VERSION"/{src,LICENSE}
+rm /tmp/php-font-lib.tar.gz
+
+curl -LsS https://github.com/PhenX/php-svg-lib/archive/v"$PHP_SVGLIB_VERSION".tar.gz -o /tmp/php-svg-lib.tar.gz
+[ -d lib/php-svg-lib ] || mkdir -p lib/php-svg-lib
+tar xf /tmp/php-svg-lib.tar.gz --strip-components 1 -C lib/php-svg-lib php-svg-lib-"$PHP_SVGLIB_VERSION"/src
+rm /tmp/php-svg-lib.tar.gz
--- a/library/vendor/dompdf/lib/Cpdf.php
+++ b/library/vendor/dompdf/lib/Cpdf.php
@@ -464,28 +464,28 @@ class Cpdf
// Named with limited valid values
case 'NonFullScreenPageMode':
if (!in_array($v, array('UseNone', 'UseOutlines', 'UseThumbs', 'UseOC'))) {
- continue;
+ continue 2;
}
$o['info'][$k] = $v;
break;
case 'Direction':
if (!in_array($v, array('L2R', 'R2L'))) {
- continue;
+ continue 2;
}
$o['info'][$k] = $v;
break;
case 'PrintScaling':
if (!in_array($v, array('None', 'AppDefault'))) {
- continue;
+ continue 2;
}
$o['info'][$k] = $v;
break;
case 'Duplex':
if (!in_array($v, array('None', 'AppDefault'))) {
- continue;
+ continue 2;
}
$o['info'][$k] = $v;
break;
@@ -4801,12 +4801,12 @@ EOT;
imagesavealpha($img, false);
// create temp alpha file
- $tempfile_alpha = tempnam($this->tmp, "cpdf_img_");
+ $tempfile_alpha = @tempnam($this->tmp, "cpdf_img_");
@unlink($tempfile_alpha);
$tempfile_alpha = "$tempfile_alpha.png";
// create temp plain file
- $tempfile_plain = tempnam($this->tmp, "cpdf_img_");
+ $tempfile_plain = @tempnam($this->tmp, "cpdf_img_");
@unlink($tempfile_plain);
$tempfile_plain = "$tempfile_plain.png";
--- a/library/vendor/dompdf/src/Adapter/CPDF.php
+++ b/library/vendor/dompdf/src/Adapter/CPDF.php
@@ -562,6 +562,25 @@ class CPDF implements Canvas
}
/**
+ * Draw line at the specified coordinates on every page.
+ *
+ * See {@link Style::munge_color()} for the format of the colour array.
+ *
+ * @param float $x1
+ * @param float $y1
+ * @param float $x2
+ * @param float $y2
+ * @param array $color
+ * @param float $width
+ * @param array $style optional
+ */
+ public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = array())
+ {
+ $_t = 'line';
+ $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 'width', 'style');
+ }
+
+ /**
* @param float $x
* @param float $y
* @param float $r1
@@ -608,7 +627,7 @@ class CPDF implements Canvas
imageinterlace($im, false);
$tmp_dir = $this->_dompdf->getOptions()->getTempDir();
- $tmp_name = tempnam($tmp_dir, "{$type}dompdf_img_");
+ $tmp_name = @tempnam($tmp_dir, "{$type}dompdf_img_");
@unlink($tmp_name);
$filename = "$tmp_name.png";
$this->_image_cache[] = $filename;
@@ -1092,6 +1111,10 @@ class CPDF implements Canvas
}
$eval->evaluate($code, array('PAGE_NUM' => $page_number, 'PAGE_COUNT' => $this->_page_count));
break;
+
+ case 'line':
+ $this->line( $x1, $y1, $x2, $y2, $color, $width, $style );
+ break;
}
}
--- a/library/vendor/dompdf/src/Adapter/GD.php
+++ b/library/vendor/dompdf/src/Adapter/GD.php
@@ -729,7 +729,7 @@ class GD implements Canvas
$func_name = "imagecreatefrom$img_type";
if (!function_exists($func_name)) {
if (!method_exists("Dompdf\Helpers", $func_name)) {
- throw new \Exception("Function $func_name() not found. Cannot convert $type image: $img_url. Please install the image PHP extension.");
+ throw new \Exception("Function $func_name() not found. Cannot convert $img_type image: $img_url. Please install the image PHP extension.");
}
$func_name = "\\Dompdf\\Helpers::" . $func_name;
}
@@ -977,6 +977,11 @@ class GD implements Canvas
{
// N/A
}
+
+ public function page_line()
+ {
+ // N/A
+ }
/**
* Streams the image to the client.
--- a/library/vendor/dompdf/src/Adapter/PDFLib.php
+++ b/library/vendor/dompdf/src/Adapter/PDFLib.php
@@ -208,7 +208,7 @@ class PDFLib implements Canvas
$this->_pdf->begin_document("", "");
} else {
$tmp_dir = $this->_dompdf->getOptions()->getTempDir();
- $tmp_name = tempnam($tmp_dir, "libdompdf_pdf_");
+ $tmp_name = @tempnam($tmp_dir, "libdompdf_pdf_");
@unlink($tmp_name);
$this->_file = "$tmp_name.pdf";
$this->_pdf->begin_document($this->_file, "");
@@ -763,6 +763,25 @@ class PDFLib implements Canvas
}
/**
+ * Draw line at the specified coordinates on every page.
+ *
+ * See {@link Style::munge_color()} for the format of the colour array.
+ *
+ * @param float $x1
+ * @param float $y1
+ * @param float $x2
+ * @param float $y2
+ * @param array $color
+ * @param float $width
+ * @param array $style optional
+ */
+ public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = array())
+ {
+ $_t = 'line';
+ $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 'width', 'style');
+ }
+
+ /**
* @param float $x1
* @param float $y1
* @param float $r1
@@ -1259,6 +1278,11 @@ class PDFLib implements Canvas
}
$eval->evaluate($code, array('PAGE_NUM' => $p, 'PAGE_COUNT' => $this->_page_count));
break;
+
+ case 'line':
+ $this->line( $x1, $y1, $x2, $y2, $color, $width, $style );
+ break;
+
}
}
--- a/library/vendor/dompdf/src/Css/Stylesheet.php
+++ b/library/vendor/dompdf/src/Css/Stylesheet.php
@@ -1357,7 +1357,7 @@ class Stylesheet
$key = $page_selector;
default:
- continue;
+ continue 3;
}
// Store the style for later...
--- a/library/vendor/dompdf/src/Dompdf.php
+++ b/library/vendor/dompdf/src/Dompdf.php
@@ -368,7 +368,7 @@ class Dompdf
$ext = strtolower(pathinfo($realfile, PATHINFO_EXTENSION));
if (!in_array($ext, $this->allowedLocalFileExtensions)) {
- throw new Exception("Permission denied on $file.");
+ throw new Exception("Permission denied on $file. This file extension is forbidden");
}
if (!$realfile) {
@@ -607,7 +607,7 @@ class Dompdf
if (!$accept) {
//found at least one mediatype, but none of the accepted ones
//Skip this css file.
- continue;
+ continue 2;
}
}
@@ -628,7 +628,7 @@ class Dompdf
($media = $tag->getAttribute("media")) &&
!in_array($media, $acceptedmedia)
) {
- continue;
+ continue 2;
}
$css = "";
@@ -945,7 +945,7 @@ class Dompdf
*
* @param array $options options (see above)
*
- * @return string
+ * @return string|null
*/
public function output($options = array())
{
--- a/library/vendor/dompdf/src/FontMetrics.php
+++ b/library/vendor/dompdf/src/FontMetrics.php
@@ -186,7 +186,7 @@ class FontMetrics
$fontDir = $this->getOptions()->getFontDir();
$remoteHash = md5($remoteFile);
$localFile = $fontDir . DIRECTORY_SEPARATOR . $remoteHash;
- $localTempFile = tempnam($this->options->get("tempDir"), "dompdf-font-");
+ $localTempFile = @tempnam($this->options->get("tempDir"), "dompdf-font-");
$cacheEntry = $localFile;
$localFile .= ".".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH),PATHINFO_EXTENSION));
--- a/library/vendor/dompdf/src/FrameDecorator/Page.php
+++ b/library/vendor/dompdf/src/FrameDecorator/Page.php
@@ -515,7 +515,7 @@ class Page extends AbstractFrameDecorato
// parents of $frame must fit on the page as well:
$p = $frame->get_parent();
while ($p) {
- $max_y += $p->get_style()->computed_bottom_spacing();
+ $max_y += (float) $p->get_style()->computed_bottom_spacing();
$p = $p->get_parent();
}
--- a/library/vendor/dompdf/src/Image/Cache.php
+++ b/library/vendor/dompdf/src/Image/Cache.php
@@ -88,7 +88,7 @@ class Cache
} // From remote
else {
$tmp_dir = $dompdf->getOptions()->getTempDir();
- $resolved_url = tempnam($tmp_dir, "ca_dompdf_img_");
+ $resolved_url = @tempnam($tmp_dir, "ca_dompdf_img_");
$image = "";
if ($data_uri) {
--- a/library/vendor/dompdf/src/Renderer/AbstractRenderer.php
+++ b/library/vendor/dompdf/src/Renderer/AbstractRenderer.php
@@ -401,7 +401,7 @@ abstract class AbstractRenderer
$this->_canvas->get_cpdf()->addImagePng($filedummy, $x, $this->_canvas->get_height() - $y - $height, $width, $height, $bg);
} else {
$tmp_dir = $this->_dompdf->getOptions()->getTempDir();
- $tmp_name = tempnam($tmp_dir, "bg_dompdf_img_");
+ $tmp_name = @tempnam($tmp_dir, "bg_dompdf_img_");
@unlink($tmp_name);
$tmp_file = "$tmp_name.png";
--- a/library/vendor/dompdf/src/Renderer/Text.php
+++ b/library/vendor/dompdf/src/Renderer/Text.php
@@ -137,7 +137,7 @@ class Text extends AbstractRenderer
switch ($text_deco) {
default:
- continue;
+ continue 2;
case "underline":
$deco_y += $base - $descent + $underline_offset + $line_thickness / 2;
Description: vendor: Update zf1 for PHP 7.3
Author: Markus Frosch <markus.frosch@icinga.com>
Origin: https://github.com/Icinga/icingaweb2/pull/3645/commits/113a10481ba5c60c16a3f6740c4ba925920a4947
--- a/library/vendor/Zend/Form.php
+++ b/library/vendor/Zend/Form.php
@@ -1159,7 +1159,7 @@ class Zend_Form implements Iterator, Cou
} else {
switch ($argc) {
case 0:
- continue;
+ continue 2;
case (1 <= $argc):
$type = array_shift($spec);
case (2 <= $argc):
@@ -1664,7 +1664,7 @@ class Zend_Form implements Iterator, Cou
*/
public function addSubForms(array $subForms)
{
- foreach ($subForms as $key => $spec) {
+ foreach ($subForms as $key => $spec) {
$name = (string) $key;
if ($spec instanceof Zend_Form) {
$this->addSubForm($spec, $name);
@@ -1676,7 +1676,7 @@ class Zend_Form implements Iterator, Cou
$order = null;
switch ($argc) {
case 0:
- continue;
+ continue 2;
case (1 <= $argc):
$subForm = array_shift($spec);
--- a/library/vendor/Zend/README.md
+++ b/library/vendor/Zend/README.md
@@ -1,6 +1,6 @@
# icingaweb2-vendor-zf1
-icingaweb2-vendor-zf1 is [Icinga Web 2](https://icinga.com/products/icinga-web-2/)'s fork of
+icingaweb2-vendor-zf1 is [Icinga Web 2](https://www.icinga.org/products/icinga-web-2/)'s fork of
[Zend Framework](https://framework.zend.com/) 1 which is
[end-of-life](https://framework.zend.com/blog/2016-06-28-zf1-eol.html) since Sep 28, 2016.
We've reduced the library to the minimum required by Icinga Web 2 and its modules.
--- a/library/vendor/Zend/VERSION
+++ b/library/vendor/Zend/VERSION
@@ -1 +1 @@
-v1.12.20
+v1.12.20-23-gc1f645550
......@@ -171,9 +171,13 @@ Option | Description
-------------------------|-----------------------------------------------
backend | **Required.** Specifies the backend type. Can be set to `ldap`, `msldap`.
resource | **Required.** The name of the LDAP resource defined in [resources.ini](04-Resources.md#resources).
user\_class | **Optional.** LDAP user class. Defaults to `user`.
domain | **Optional.** The domain the LDAP server is responsible for. See [Domain-aware Authentication](05-Authentication.md#domain-aware-authentication).
user\_class | **Optional.** LDAP user class. Defaults to `inetOrgPerson` with `msldap` and `user` with `ldap`.
user\_name\_attribute | **Optional.** LDAP attribute which contains the username. Defaults to `sAMAccountName` with `msldap` and `uid` with `ldap`.
user\_base\_dn | **Optional.** The path where users can be found on the LDAP server.
base_dn | **Optional.** LDAP base dn for groups. Leave empty to select all groups available using the specified resource.
group\_class | **Optional.** LDAP group class. Defaults to `group`.
group\_member\_attribute | **Optional.** LDAP attribute where a group's members are stored. Defaults to `member`.
group\_name\_attribute | **Optional.** LDAP attribute which contains the groupname. Defaults to `sAMAccountName` with `msldap` and `gid` with `ldap`.
group\_filter | **Optional.** LDAP group search filter. Requires `group_class` and `group_name_attribute`.
nested\_group\_search | **Optional.** Enable nested group search in Active Directory based on the user. Defaults to `0`. Only available with `backend` type `msldap`.
......
......@@ -618,11 +618,7 @@ abstract class ApplicationBootstrap
{
$timezone = $this->detectTimeZone();
if ($timezone === null || @date_default_timezone_set($timezone) === false) {
$timezone = @date_default_timezone_get();
if ($timezone === false) {
$timezone = 'UTC';
date_default_timezone_set($timezone);
}
date_default_timezone_set(@date_default_timezone_get());
}
return $this;
}
......
......@@ -686,7 +686,7 @@ class Module
case 'depends':
if (strpos($val, ' ') === false) {
$metadata->depends[$val] = true;
continue;
continue 2;
}
$parts = preg_split('/,\s+/', $val);
......