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-05-22 10:59:13

Ra0h
Member
Registered: 2017-01-09
Posts: 18

[GLPI 9.1.1] Collecteur Courriel - Opération échoué

Bonjour,

Je rencontre un soucis lors de la recupération de certains suivi depuis mes collecteurs.
Le probleme se présente lorsque les conditions suivantes sont réunies :

Email provient d'une boite GMAIL
Suivi d'un ticket (l'erreur ne se produit pas a la création d'un ticket)
Charactère special dans le corps du message example une apostrophe

Le mail n'est pas importé, motif : Opération échouée, une erreur SQL est genéré
Exemple d'erreur générée

2017-05-17 11:25:40 [2@FRSVVGLPI2]
  *** MySQL query error:
  SQL: INSERT
                   INTO `glpi_ticketfollowups` (`content`,`tickets_id`,`users_id`,`requesttypes_id`,`is_private`,`date`,`date_creation`,`date_mod`) VALUES (\'J\'apostrophe\\n\',\'2017012873\',\'0\',\'2\',0,\'2017-05-17 11:25:39\',\'2017-05-17 11:25:39\',\'2017-05-17 11:25:39\')
  Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'apostrophe\n','2017012873','0','2',0,'2017-05-17 11:25:39','2017-05-17 11:25:39'' at line 2
  Backtrace :
  inc\commondbtm.class.php:436                       
  inc\commondbtm.class.php:852                       CommonDBTM->addToDB()
  inc\mailcollector.class.php:554                    CommonDBTM->add()
  front\mailcollector.form.php:80                    MailCollector->collect()

Exemple d'email genérant l'erreur

MIME-Version: 1.0
Received: by 10.25.233.139 with HTTP; Wed, 17 May 2017 02:12:25 -0700 (PDT)
In-Reply-To: <GLPI-2017012873.1495012231.16841@FRSVVGLPI2>
References: <GLPI-2017012873.1495012231.16841@FRSVVGLPI2>
Date: Wed, 17 May 2017 11:12:25 +0200
Delivered-To: toto@gmail.com
Message-ID: <CAHbwPMZ2-opyX1pnkgyq41QLUWhwP3-HShDQ0DP724rs11xRiA@mail.gmail.com>
Subject: Re: [SUPPORT #2017012873] Test caractere - Nouveau ticket
From: toto toto <toto@gmail.com>
To: helpdesk-test@mondomaine.com
Content-Type: multipart/alternative; boundary="001a11401a9ecf19bf054fb4afea"

--001a11401a9ecf19bf054fb4afea
Content-Type: text/plain; charset="UTF-8"

J'apostrophe

--001a11401a9ecf19bf054fb4afea
Content-Type: text/html; charset="UTF-8"

<div dir="ltr">J&#39;apostrophe</div>

--001a11401a9ecf19bf054fb4afea--

Le meme Email mais créant un ticket au lieu d'un suivi et ne générant pas d'erreur

MIME-Version: 1.0
Received: by 10.25.233.139 with HTTP; Wed, 17 May 2017 02:10:13 -0700 (PDT)
Date: Wed, 17 May 2017 11:10:13 +0200
Delivered-To: toto@gmail.com
Message-ID: <CAHbwPMb_G2Cnd_JOjwwrWeFAzeR8XLFBphYAfy+3vs-akfc9ew@mail.gmail.com>
Subject: Test caractere
From: toto toto <toto@gmail.com>
To: supporttest@mondomaine.com
Content-Type: multipart/alternative; boundary="001a113be826e9bf17054fb4a7c0"

--001a113be826e9bf17054fb4a7c0
Content-Type: text/plain; charset="UTF-8"

J'apostrophe

--001a113be826e9bf17054fb4a7c0
Content-Type: text/html; charset="UTF-8"

<div dir="ltr">J&#39;apostrophe</div>

--001a113be826e9bf17054fb4a7c0--

Informations sur le système, l'installation et la configuration

 
GLPI 9.1.1 (/glpi => C:\tlg\xampp\htdocs\glpi)

Server
 
Operating system: Windows NT FRSVVGLPI3 6.3 build 9600 (Windows Server 2012 R2 Datacenter Edition) i586
PHP 7.0.9 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, apache2handler, bcmath, bz2, calendar, ctype, curl, date,
    dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mysqli, mysqlnd,
    openssl, pcre, pdo_mysql, pdo_sqlite, session, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, zlib)
Setup: max_execution_time="600" memory_limit="1024M" post_max_size="20M" safe_mode="" session.save_handler="files"
    upload_max_filesize="20M" 
Software: Apache ()
    Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Server Software: mariadb.org binary distribution
    Server Version: 10.1.16-MariaDB
    Server SQL Mode: 
    Parameters: glpi@localhost/glpi
    Host info: localhost via TCP/IP
    
OKC:\tlg\xampp\htdocs\glpi/config : OK
OKC:\tlg\xampp\htdocs\glpi/files : OK
OKC:\tlg\xampp\htdocs\glpi/files/_dumps : OK
OKC:\tlg\xampp\htdocs\glpi/files/_sessions : OK
OKC:\tlg\xampp\htdocs\glpi/files/_cron : OK
OKC:\tlg\xampp\htdocs\glpi/files/_graphs : OK
OKC:\tlg\xampp\htdocs\glpi/files/_lock : OK
OKC:\tlg\xampp\htdocs\glpi/files/_plugins : OK
OKC:\tlg\xampp\htdocs\glpi/files/_tmp : OK
OKC:\tlg\xampp\htdocs\glpi/files/_rss : OK
OKC:\tlg\xampp\htdocs\glpi/files/_uploads : OK
OKC:\tlg\xampp\htdocs\glpi/files/_pictures : OK
OKC:\tlg\xampp\htdocs\glpi/files/_log : OK
Web access to files directory is protectedWeb access to files directory is protected : OK

Libraries
 
htmLawed version 1.1.21 in (C:\tlg\xampp\htdocs\glpi\lib\htmlawed)
phpCas version 1.3.4 in (C:\tlg\xampp\htdocs\glpi\vendor\jasig\phpcas\source)
PHPMailer version 5.2.16 in (C:\tlg\xampp\htdocs\glpi\vendor\phpmailer\phpmailer)
Zend Framework in (C:\tlg\xampp\htdocs\glpi\vendor\zendframework\zend-loader\src)
zetacomponents/graph in (C:\tlg\xampp\htdocs\glpi\vendor\zetacomponents\graph\src)
SimplePie version 1.4.1 in (C:\tlg\xampp\htdocs\glpi\vendor\simplepie\simplepie\library)
TCPDF version 6.2.12 in (C:\tlg\xampp\htdocs\glpi\vendor\tecnickcom\tcpdf)
michelf/php-markdown in (C:\tlg\xampp\htdocs\glpi\vendor\michelf\php-markdown\Michelf)
true/punycode in (C:\tlg\xampp\htdocs\glpi\vendor\true\punycode\src)
iacaml/autolink in (C:\tlg\xampp\htdocs\glpi\vendor\iamcal\lib_autolink)
sabre/vobject in (C:\tlg\xampp\htdocs\glpi\vendor\sabre\vobject\lib)

Plugins list
 
    behaviors            Name: Comportements                  Version: 1.2        State: Enabled
    mydashboard          Name: Dashboard                      Version: 1.3.2      State: Enabled
    escalade             Name: Escalades                      Version: 2.1.0      State: Enabled
    fusioninventory      Name: FusionInventory                Version: 9.1+1.1    State: Enabled
    datainjection        Name: Injection de fichiers          Version: 2.4.2      State: Enabled
    dashboard            Name: Tableau de bord                Version: 0.7.9      State: Enabled

Last edited by Ra0h (2017-05-22 11:00:52)

Offline

#2 2017-05-22 17:53:15

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

Re: [GLPI 9.1.1] Collecteur Courriel - Opération échoué

Pour moi ce problème est solutionné dans la dernière version stable (9.1.3)


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

Offline

#3 2017-05-24 11:44:30

Ra0h
Member
Registered: 2017-01-09
Posts: 18

Re: [GLPI 9.1.1] Collecteur Courriel - Opération échoué

Bonjour Yllen,

Je ne trouve pas l'issue dans les change logs, serait-il possible de savoir quel correctif a été apporté,
Une monté de version sur notre system étant difficile a envisager

Offline

#4 2017-05-24 13:37:47

Ra0h
Member
Registered: 2017-01-09
Posts: 18

Re: [GLPI 9.1.1] Collecteur Courriel - Opération échoué

Rebonjour,

Apres verification le problème persiste sur la version 9.1.3 sans plugin installé

Offline

#5 2017-06-02 10:56:19

Ra0h
Member
Registered: 2017-01-09
Posts: 18

Re: [GLPI 9.1.1] Collecteur Courriel - Opération échoué

Personne n'aurait d'info pouvant aider ?

Offline

#6 2017-06-06 13:16:29

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

Re: [GLPI 9.1.1] Collecteur Courriel - Opération échoué

Je viens de refaire un test en 9.1.3 avec le même texte que vous et je ne reproduis pas l'erreur.
Dans le fichier Mailcollector.CLASS.PHP, fonction BuildTicket, ce commit est bien présent  https://github.com/glpi-project/glpi/co … e8ba7177fc ?


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

Offline

#7 2017-06-14 14:55:23

Ra0h
Member
Registered: 2017-01-09
Posts: 18

Re: [GLPI 9.1.1] Collecteur Courriel - Opération échoué

Bonjour Yllen,

Je viens de vérifier et cette portion de code est bien présente(et est présente sur ma version 9.1.1) sur mon environnement de test mais le problème persiste.

A noter :
- Forcer l'import via l l'action de masse dans la liste des courriel non importé débloque le courriel mais crée un nouveau ticket (au lieu d un suivi)
- Désactiver l'option "Utiliser du texte riche pour l'assistance" débloque le courriel, qui est importé avec succès en tant que suivi

Offline

Board footer

Powered by FluxBB