On augmente encore la secu : le login est aussi aléatoire 32 caracteres
et le mdp 36
This commit is contained in:
parent
70504d5c52
commit
176386f241
2 changed files with 6 additions and 5 deletions
|
@ -28,12 +28,13 @@ function gamumail_upgrade($nom_meta_base_version, $version_cible) {
|
||||||
|
|
||||||
$maj['create'] = array(array('maj_tables', array('spip_gamumails', 'spip_gamumail_pdfs')));
|
$maj['create'] = array(array('maj_tables', array('spip_gamumails', 'spip_gamumail_pdfs')));
|
||||||
$maj['1.0.2'] = array(array('maj_tables', array('spip_gamumails', 'spip_gamumail_pdfs')));
|
$maj['1.0.2'] = array(array('maj_tables', array('spip_gamumails', 'spip_gamumail_pdfs')));
|
||||||
$maj['1.0.3'] = array(array('creer_compte_curl'));
|
$maj['1.0.5'] = array(array('creer_compte_curl'));
|
||||||
|
|
||||||
function creer_compte_curl(){
|
function creer_compte_curl(){
|
||||||
$mdp = uniqid(uniqid(),1);
|
$mdp = uniqid(uniqid(),1);
|
||||||
$set = [
|
$set = [
|
||||||
'login' => 'curl_login',
|
'nom' => 'curl_login',
|
||||||
|
'login' => hash('md5', 'curl_login'.time()),
|
||||||
'pass' => hash('sha256', $mdp),
|
'pass' => hash('sha256', $mdp),
|
||||||
'statut' => '1comite'
|
'statut' => '1comite'
|
||||||
];
|
];
|
||||||
|
@ -42,7 +43,7 @@ function gamumail_upgrade($nom_meta_base_version, $version_cible) {
|
||||||
$id_auteur = auteur_inserer(null, $set);
|
$id_auteur = auteur_inserer(null, $set);
|
||||||
if ($id_auteur) {
|
if ($id_auteur) {
|
||||||
include_spip('inc/config');
|
include_spip('inc/config');
|
||||||
ecrire_config('curl_login', 'curl_login');
|
ecrire_config('curl_login', $set['login']);
|
||||||
ecrire_config('curl_mdp', $mdp);
|
ecrire_config('curl_mdp', $mdp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<paquet
|
<paquet
|
||||||
prefix="gamumail"
|
prefix="gamumail"
|
||||||
categorie="communication"
|
categorie="communication"
|
||||||
version="1.0.3"
|
version="1.0.5"
|
||||||
etat="dev"
|
etat="dev"
|
||||||
compatibilite="[3.3.0-dev;3.3.*]"
|
compatibilite="[3.3.0-dev;3.3.*]"
|
||||||
logo="prive/themes/spip/images/gamumail-64.png"
|
logo="prive/themes/spip/images/gamumail-64.png"
|
||||||
documentation=""
|
documentation=""
|
||||||
schema="1.0.3"
|
schema="1.0.5"
|
||||||
>
|
>
|
||||||
<!--
|
<!--
|
||||||
Paquet généré le 2020-04-24 20:56:15
|
Paquet généré le 2020-04-24 20:56:15
|
||||||
|
|
Loading…
Add table
Reference in a new issue