Fix token for ping
This commit is contained in:
parent
4f9211d3e5
commit
85a0ae1236
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2019-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/ajax/pingresult.php
|
* \file htdocs/core/ajax/pingresult.php
|
||||||
* \brief File to save result of an anonymous ping into database (1 ping is done per installation)
|
* \brief Page called after a ping was done in js to the official dolibarr ping service.
|
||||||
|
* This ajax URL is called with parameter 'firstpingok' or 'firstpingko' depending on the result of the ping.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('NOTOKENRENEWAL')) {
|
if (!defined('NOTOKENRENEWAL')) {
|
||||||
|
|||||||
@ -3364,7 +3364,7 @@ if (!function_exists("llxFooter")) {
|
|||||||
url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>',
|
url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>',
|
||||||
timeout: 500, // timeout milliseconds
|
timeout: 500, // timeout milliseconds
|
||||||
cache: false,
|
cache: false,
|
||||||
data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingok', token: 'notrequired' }, // for update
|
data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingok', token: '<?php echo currentToken(); ?>' }, // for update
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error: function (data,status,xhr) { // error callback function
|
error: function (data,status,xhr) { // error callback function
|
||||||
@ -3374,7 +3374,7 @@ if (!function_exists("llxFooter")) {
|
|||||||
url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>',
|
url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>',
|
||||||
timeout: 500, // timeout milliseconds
|
timeout: 500, // timeout milliseconds
|
||||||
cache: false,
|
cache: false,
|
||||||
data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingko', token: 'notrequired' },
|
data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingko', token: '<?php echo currentToken(); ?>' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user