You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2017-12-18 14:57:01

amma35
Moderator
Registered: 2017-02-08
Posts: 42

[Behaviors-2.0.0] Error closing the ticket (Security die. trying to..)

Setup of plugin :
- "Use the associated item's group" = YES

1- Ticket with linked element (example: a software with a group)
2- Changing the status of the "Closed" ticket => Error: "Security die. trying to load a forbidden class name"


I modified this it works:

Index: ticket.class.php
===================================================================
--- ticket.class.php	(revision 237)
+++ ticket.class.php	(working copy)
@@ -520,7 +520,7 @@
              && (is_array($ticket->input['items_id']))) {
             foreach ($ticket->input['items_id'] as $type => $items) {
                foreach ($items as $number => $id) {
-                  if (($item = $dbu->getItemForItemtype($id))
+                  if (($item = $dbu->getItemForItemtype($type))
                       && (!isset($ticket->input['_groups_id_requester'])
                           || ($ticket->input['_groups_id_requester'] <= 0))) {
 
@@ -527,7 +527,8 @@
                      if ($item->isField('groups_id')) {
                         foreach ($items as $itemid) {
                            if ($item->getFromDB($itemid)) {
-                              $ticket->input['_groups_id_requester'] = $item->getField('groups_id');
+                              $ticket->input['_itil_requester'] = array('_type' => 'group',
+                                                                        'groups_id' => $item->getField('groups_id'));
                            }
                         }
                      }

Offline

#2 2018-01-08 21:10:19

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,127

Re: [Behaviors-2.0.0] Error closing the ticket (Security die. trying to..)

Ticket ouvert sur la forge : https://forge.glpi-project.org/issues/5543


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2018-02-02 17:25:52

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 14,127

Re: [Behaviors-2.0.0] Error closing the ticket (Security die. trying to..)

Version published with this correction (2.0.1)


CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB