|
@@ -17,7 +17,8 @@
|
|
|
|
|
|
/**
|
|
|
* \file htdocs/core/ajax/security.php
|
|
|
- * \brief File for return security data
|
|
|
+ * \brief This ajax component is used to generated has keys for security purposes
|
|
|
+ * like key to use into URL to protect them.
|
|
|
*/
|
|
|
|
|
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
|
@@ -33,10 +34,6 @@ require '../../main.inc.php';
|
|
|
* View
|
|
|
*/
|
|
|
|
|
|
-// Ajout directives pour resoudre bug IE
|
|
|
-//header('Cache-Control: Public, must-revalidate');
|
|
|
-//header('Pragma: public');
|
|
|
-
|
|
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
|
|
top_httphead();
|
|
|
|
|
@@ -48,7 +45,7 @@ if (isset($_GET['action']) && ! empty($_GET['action']))
|
|
|
if ($_GET['action'] == 'getrandompassword' && $user->admin)
|
|
|
{
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
|
|
- $generic = $_GET['generic'];
|
|
|
+ $generic = $_GET['generic'] ? true : false;
|
|
|
echo getRandomPassword($generic);
|
|
|
}
|
|
|
}
|