From 939f5ce095c7f29e9d2fe58a4f5fa23a4486f948 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 31 Oct 2020 18:44:28 +0100 Subject: [PATCH] Fix escaping of data on ping --- htdocs/main.inc.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a88ea223a5d..83157cc8c9d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2865,35 +2865,35 @@ if (!function_exists("llxFooter")) timeout: 500, // timeout milliseconds cache: false, data: { - hash_algo: "md5", - hash_unique_id: "", - action: "dolibarrping", - version: "", - entity: "entity; ?>", - dbtype: "type); ?>", - country_code: "country_code); ?>", - php_version: "", - os_version: "", - distrib: "" + hash_algo: 'md5', + hash_unique_id: '', + action: 'dolibarrping', + version: '', + entity: 'entity; ?>', + dbtype: 'type); ?>', + country_code: 'country_code); ?>', + php_version: '', + os_version: '', + distrib: '' }, success: function (data, status, xhr) { // success callback function (data contains body of response) console.log("Ping ok"); $.ajax({ - method: "GET", - url: "", + method: 'GET', + url: '', timeout: 500, // timeout milliseconds cache: false, - data: { hash_algo: "md5", hash_unique_id: "", action: "firstpingok" }, // to update + data: { hash_algo: 'md5', hash_unique_id: '', action: 'firstpingok' }, // for update }); }, error: function (data,status,xhr) { // error callback function console.log("Ping ko: " + data); $.ajax({ - method: "GET", - url: "", + method: 'GET', + url: '', timeout: 500, // timeout milliseconds cache: false, - data: { hash_algo: "md5", hash_unique_id: "", action: "firstpingko" }, + data: { hash_algo: 'md5', hash_unique_id: '', action: 'firstpingko' }, }); } });