Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package icingaweb2-module-director for 
openSUSE:Factory checked in at 2024-12-13 22:39:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/icingaweb2-module-director (Old)
 and      /work/SRC/openSUSE:Factory/.icingaweb2-module-director.new.29675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "icingaweb2-module-director"

Fri Dec 13 22:39:02 2024 rev:24 rq:1230752 version:1.11.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/icingaweb2-module-director/icingaweb2-module-director.changes
    2024-11-22 23:52:57.708989897 +0100
+++ 
/work/SRC/openSUSE:Factory/.icingaweb2-module-director.new.29675/icingaweb2-module-director.changes
 2024-12-13 22:41:35.382199489 +0100
@@ -1,0 +2,13 @@
+Fri Dec 13 07:00:48 UTC 2024 - ecsos <ec...@opensuse.org>
+
+- Update to 1.11.3
+  * UI
+    - FIX: Property sort tables does not cause CSRF token validation anymore 
(#2937)
+    - FIX: No error when clicking modify action link for services belonging to 
service set in Icinga DB (#2938)
+    - FIX: No crashing of Host template form when invalid check command is 
entered (#2941)
+  * Internals
+    - FIX: Filter can be now removed in import source modifiers (#2939)
+  * Fixed Issues
+    You can find issues related to this release on our roadmap
+
+-------------------------------------------------------------------

Old:
----
  icingaweb2-module-director-1.11.2.tar.gz

New:
----
  icingaweb2-module-director-1.11.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ icingaweb2-module-director.spec ++++++
--- /var/tmp/diff_new_pack.OIeBiu/_old  2024-12-13 22:41:35.818217677 +0100
+++ /var/tmp/diff_new_pack.OIeBiu/_new  2024-12-13 22:41:35.818217677 +0100
@@ -22,7 +22,7 @@
 %define icingadirector_user icingadirector
 
 Name:           icingaweb2-module-director
-Version:        1.11.2
+Version:        1.11.3
 Release:        0
 Summary:        Config module for Icinga Web 2
 License:        GPL-2.0-or-later

++++++ icingaweb2-module-director-1.11.2.tar.gz -> 
icingaweb2-module-director-1.11.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/application/forms/IcingaHostForm.php 
new/icingaweb2-module-director-1.11.3/application/forms/IcingaHostForm.php
--- old/icingaweb2-module-director-1.11.2/application/forms/IcingaHostForm.php  
2024-11-19 21:12:35.000000000 +0100
+++ new/icingaweb2-module-director-1.11.3/application/forms/IcingaHostForm.php  
2024-12-12 13:20:10.000000000 +0100
@@ -2,6 +2,7 @@
 
 namespace Icinga\Module\Director\Forms;
 
+use Exception;
 use Icinga\Exception\AuthenticationException;
 use Icinga\Module\Director\Auth\Permission;
 use Icinga\Module\Director\Auth\Restriction;
@@ -83,7 +84,13 @@
             'class' => 'autosubmit',
         ]);
 
-        if ($this->getSentOrResolvedObjectValue('has_agent') === 'y') {
+        try {
+            $hasAgent = $this->getSentOrResolvedObjectValue('has_agent') === 
'y';
+        } catch (Exception $e) {
+            $hasAgent = false;
+        }
+
+        if ($hasAgent) {
             $this->addBoolean('master_should_connect', [
                 'label'       => $this->translate('Establish connection'),
                 'description' => $this->translate(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/application/forms/ImportRowModifierForm.php
 
new/icingaweb2-module-director-1.11.3/application/forms/ImportRowModifierForm.php
--- 
old/icingaweb2-module-director-1.11.2/application/forms/ImportRowModifierForm.php
   2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/application/forms/ImportRowModifierForm.php
   2024-12-12 13:20:10.000000000 +0100
@@ -214,4 +214,13 @@
 
         return $this;
     }
+
+    public function onSuccess()
+    {
+        if ($this->getValue('use_filter') === 'n') {
+            $this->getObject()->set('filter_expression', null);
+        }
+
+        parent::onSuccess();
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/doc/02-Installation.md.d/From-Source.md 
new/icingaweb2-module-director-1.11.3/doc/02-Installation.md.d/From-Source.md
--- 
old/icingaweb2-module-director-1.11.2/doc/02-Installation.md.d/From-Source.md   
    2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/doc/02-Installation.md.d/From-Source.md   
    2024-12-12 13:20:10.000000000 +0100
@@ -41,7 +41,7 @@
 You might want to use a script as follows for this task:
 
 ```shell
-MODULE_VERSION="1.11.2"
+MODULE_VERSION="1.11.3"
 ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
 REPO_URL="https://github.com/icinga/icingaweb2-module-director";
 TARGET_DIR="${ICINGAWEB_MODULEPATH}/director"
@@ -60,7 +60,7 @@
 You might want to use a script as follows for this task:
 
 ```shell
-MODULE_VERSION="1.11.2"
+MODULE_VERSION="1.11.3"
 ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
 REPO_URL="https://github.com/icinga/icingaweb2-module-director";
 TARGET_DIR="${ICINGAWEB_MODULEPATH}/director"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/doc/82-Changelog.md 
new/icingaweb2-module-director-1.11.3/doc/82-Changelog.md
--- old/icingaweb2-module-director-1.11.2/doc/82-Changelog.md   2024-11-19 
21:12:35.000000000 +0100
+++ new/icingaweb2-module-director-1.11.3/doc/82-Changelog.md   2024-12-12 
13:20:10.000000000 +0100
@@ -4,6 +4,17 @@
 Please make sure to always read our [Upgrading](05-Upgrading.md) documentation
 before switching to a new version.
 
+v1.11.3
+-------
+
+### UI
+* FIX: Property sort tables does not cause CSRF token validation anymore 
(#2937)
+* FIX: No error when clicking `modify` action link for services belonging to 
service set in Icinga DB (#2938)
+* FIX: No crashing of Host template form when invalid check command is entered 
(#2941)
+
+### Internals
+* FIX: Filter can be now removed in import source modifiers (#2939)
+
 v1.11.2
 -------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/library/Director/DirectorObject/Lookup/ServiceSetServiceInfo.php
 
new/icingaweb2-module-director-1.11.3/library/Director/DirectorObject/Lookup/ServiceSetServiceInfo.php
--- 
old/icingaweb2-module-director-1.11.2/library/Director/DirectorObject/Lookup/ServiceSetServiceInfo.php
      2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/library/Director/DirectorObject/Lookup/ServiceSetServiceInfo.php
      2024-12-12 13:20:10.000000000 +0100
@@ -3,6 +3,7 @@
 namespace Icinga\Module\Director\DirectorObject\Lookup;
 
 use gipfl\IcingaWeb2\Url;
+use Icinga\Module\Director\Db\DbUtil;
 use Icinga\Module\Director\Objects\IcingaHost;
 use Icinga\Module\Director\Repository\IcingaTemplateRepository;
 use Ramsey\Uuid\Uuid;
@@ -75,7 +76,7 @@
                 $host->getObjectName(),
                 $serviceName,
                 $row->service_set_name,
-                Uuid::fromBytes($row->uuid)
+                Uuid::fromBytes(DbUtil::binaryResult($row->uuid))
             );
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Form/PropertyTableSortForm.php
 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Form/PropertyTableSortForm.php
--- 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Form/PropertyTableSortForm.php
   2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Form/PropertyTableSortForm.php
   2024-12-12 13:20:10.000000000 +0100
@@ -2,15 +2,13 @@
 
 namespace Icinga\Module\Director\Web\Form;
 
-use Icinga\Web\Session;
+use ipl\Html\Contract\FormElement;
 use ipl\Html\Form;
+use ipl\Html\FormElement\HiddenElement;
 use ipl\Html\ValidHtml;
-use ipl\Web\Common\CsrfCounterMeasure;
 
 class PropertyTableSortForm extends Form
 {
-    use CsrfCounterMeasure;
-
     protected $method = 'POST';
 
     /** @var string Name of the form */
@@ -28,7 +26,38 @@
     protected function assemble()
     {
         $this->addElement('hidden', '__FORM_NAME', ['value' => $this->name]);
-        
$this->addElement($this->createCsrfCounterMeasure(Session::getSession()->getId()));
+        $this->addElement($this->createCsrfCounterMeasure());
         $this->addHtml($this->table);
     }
+
+    /**
+     * Create a form element to countermeasure CSRF attacks
+     *
+     * @return FormElement
+     */
+    protected function createCsrfCounterMeasure(): FormElement
+    {
+        $token = CsrfToken::generate();
+
+        $options = [
+            'ignore'        => true,
+            'required'      => true,
+            'validators'    => ['Callback' => function ($token) {
+                return CsrfToken::isValid($token);
+            }]
+        ];
+
+        $element = new class (QuickForm::CSRF, $options) extends HiddenElement 
{
+            public function hasValue(): bool
+            {
+                return true; // The validator must run even if the value is 
empty
+            }
+        };
+
+        $element->getAttributes()->registerAttributeCallback('value', function 
() use ($token) {
+            return $token;
+        });
+
+        return $element;
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Table/ObjectsTableSetMembers.php
 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Table/ObjectsTableSetMembers.php
--- 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Table/ObjectsTableSetMembers.php
 2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Table/ObjectsTableSetMembers.php
 2024-12-12 13:20:10.000000000 +0100
@@ -8,6 +8,7 @@
 use gipfl\IcingaWeb2\Table\ZfQueryBasedTable;
 use gipfl\IcingaWeb2\Url;
 use Icinga\Module\Director\Db\DbSelectParenthesis;
+use Icinga\Module\Director\Db\DbUtil;
 use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
 use Icinga\Module\Director\Objects\IcingaObject;
 use Icinga\Module\Director\Restriction\FilterByNameRestriction;
@@ -97,7 +98,7 @@
     {
         $url = Url::fromPath('director/service/edit', [
             'name' => $row->object_name,
-            'uuid' => Uuid::fromBytes($row->uuid)->toString(),
+            'uuid' => 
Uuid::fromBytes(DbUtil::binaryResult($row->uuid))->toString(),
         ]);
 
         return static::tr([
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Table/PropertymodifierTable.php
 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Table/PropertymodifierTable.php
--- 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Table/PropertymodifierTable.php
  2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Table/PropertymodifierTable.php
  2024-12-12 13:20:10.000000000 +0100
@@ -12,6 +12,7 @@
 use gipfl\IcingaWeb2\Table\ZfQueryBasedTable;
 use gipfl\IcingaWeb2\Url;
 use Icinga\Module\Director\Web\Form\PropertyTableSortForm;
+use Icinga\Module\Director\Web\Form\QuickForm;
 use ipl\Html\Form;
 use ipl\Html\HtmlString;
 
@@ -59,7 +60,7 @@
         return (new PropertyTableSortForm($this->getUniqueFormName(), new 
HtmlString(parent::render())))
             ->setAction($this->request->getUrl()->getAbsoluteUrl())
             ->on(Form::ON_SENT, function (PropertyTableSortForm $form) {
-                $csrf = $form->getElement('CSRFToken');
+                $csrf = $form->getElement(QuickForm::CSRF);
                 if ($csrf !== null && $csrf->isValid()) {
                     $this->reallyHandleSortPriorityActions();
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Table/SyncpropertyTable.php
 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Table/SyncpropertyTable.php
--- 
old/icingaweb2-module-director-1.11.2/library/Director/Web/Table/SyncpropertyTable.php
      2024-11-19 21:12:35.000000000 +0100
+++ 
new/icingaweb2-module-director-1.11.3/library/Director/Web/Table/SyncpropertyTable.php
      2024-12-12 13:20:10.000000000 +0100
@@ -8,6 +8,7 @@
 use gipfl\IcingaWeb2\Table\Extension\ZfSortablePriority;
 use gipfl\IcingaWeb2\Table\ZfQueryBasedTable;
 use Icinga\Module\Director\Web\Form\PropertyTableSortForm;
+use Icinga\Module\Director\Web\Form\QuickForm;
 use ipl\Html\Form;
 use ipl\Html\HtmlString;
 
@@ -44,7 +45,7 @@
         return (new PropertyTableSortForm($this->getUniqueFormName(), new 
HtmlString(parent::render())))
             ->setAction($this->request->getUrl()->getAbsoluteUrl())
             ->on(Form::ON_SENT, function (PropertyTableSortForm $form) {
-                $csrf = $form->getElement('CSRFToken');
+                $csrf = $form->getElement(QuickForm::CSRF);
                 if ($csrf !== null && $csrf->isValid()) {
                     $this->reallyHandleSortPriorityActions();
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/icingaweb2-module-director-1.11.2/module.info 
new/icingaweb2-module-director-1.11.3/module.info
--- old/icingaweb2-module-director-1.11.2/module.info   2024-11-19 
21:12:35.000000000 +0100
+++ new/icingaweb2-module-director-1.11.3/module.info   2024-12-12 
13:20:10.000000000 +0100
@@ -1,5 +1,5 @@
 Name: Icinga Director
-Version: 1.11.2
+Version: 1.11.3
 Depends: reactbundle (>=0.9.0), ipl (>=0.5.0), incubator (>=0.22.0)
 Description: Director - Config tool for Icinga 2
  Icinga Director is a configuration tool that has been designed to make

Reply via email to