From ea86f258a39c52d4d6aeb5112ae998d38a9d87e1 Mon Sep 17 00:00:00 2001 From: Jeremy DUCOURTHIAL Date: Wed, 19 Oct 2022 14:41:55 +0200 Subject: [PATCH 1/2] =?UTF-8?q?S=C3=A9curisation=20du=20mot=20de=20passe?= =?UTF-8?q?=20sur=20la=20page=20connexion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Connexion.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pages/Connexion.js b/src/pages/Connexion.js index 6face55..3154f95 100644 --- a/src/pages/Connexion.js +++ b/src/pages/Connexion.js @@ -17,7 +17,7 @@ function Connexion() { } function changePassword(event) { - setPassword(CryptoJS.SHA256(event.target.value).toString(CryptoJS.enc.Hex)); + setPassword(event.target.value); } function chechAuth(event) { @@ -34,9 +34,12 @@ function Connexion() { setAuth("Failed"); return; } - const apiString = '/User/Auth/' + login + "/" + password; + + const apiString = '/User/Auth/' + login + "/" + CryptoJS.SHA256(password).toString(CryptoJS.enc.Hex); api.get(apiString).then((response) => { const users = response.data; + console.log(response.data.length); + console.log(users.length); if (users.length > 0) if (users[0].result === 1) setAuth("Succeed"); @@ -73,9 +76,9 @@ function Connexion() { -

{auth === ""?'':auth === "Failed"?'Authentification Failed':'User Unknown'}

+ Mot de passe oublié ? +

{auth === ""?'':auth === "Failed"?'Authentification Echoué':'Utilisateur inconnu'}

- Mot de passe oublié ? ); } From 9dd45f29b5bd407d2675f30416ae2e7e2567052b Mon Sep 17 00:00:00 2001 From: Tristan BARLET Date: Wed, 19 Oct 2022 17:48:20 +0200 Subject: [PATCH 2/2] mise en place DRONE --- .drone.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e9d2fa5 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,13 @@ +kind: pipeline +name: JTT_CRM_Pipeline + +trigger: + event: + - push + +steps: +- name: start + image: node + commands: + - npm install + - npm start