glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.2k stars 1.28k forks source link

strange recurrent SQL error #1264

Closed vrocheUP closed 6 years ago

vrocheUP commented 7 years ago

Hello team, I have a strange bug with GLPI 9.1. Extract from sql-errors.log :

2016-11-09 08:51:02 [@glpi] * MySQL query error: SQL: INSERT INTO glpi_ticketfollowups (content,tickets_id,users_id,requesttypes_id,is_private,date,date_creation,date_mod) VALUES (\'Bonsoir,\nJe vous réponds pour vous donner la réponse à ma question secrète : xxxx,\nSi je me suis trompé, pourriez vous quand même envoyer l\'identifiant sur la boite laposte.net ? \nVous remerciant d\'avance,\nCordialement,\nA. François\n\nLe 4 novembre 2016 à 22:22, <helpdesk@univ-poitiers.fr> a écrit :\n\n \n\n\',\'2602\',\'0\',\'0\',0**,\'2016-11-09 08:51:01\',\'2016-11-09 08:51:01\',\'2016-11-09 08:51:01\')

As you can see, the value of the field "is_private" is not delimited by simple quotes. There is a new line in sql-erros.log every 5 minutes (this is the time-step I choosed for cron) since #4 of november.

So I have 2 or 3 questions :

  1. why is this request malformed ? It's the only one of this sort in sql-errors.log
  2. why is GLPI still trying to insert this request after several trials ? Isn't there a time-out for such errors ? Today, I have 1033 trials !
  3. I have restarted Apache, and even rebooted the server, thinking of something like a cache. No way, GLPI is still trying to insert this wrong request. Where is it stored ? How can I delete this request ?

Sincerely, Valéry config_GLPI.txt

bigben386 commented 6 years ago

Ok I just confirmed. I changed str_replace( ['&#039;', '&quot'], ["'", "'"], $value

To str_replace( ['&#39;', '&quot'], ["'", "'"], $value and all my emails imported properly.

orthagh commented 6 years ago

Thanks for your notice, above pr include the changes (#418)

bigben386 commented 6 years ago

Thanks @orthagh