Skip to content

Commit

Permalink
added pw hash
Browse files Browse the repository at this point in the history
  • Loading branch information
effy971 committed Dec 14, 2020
1 parent 819139b commit d8a0d12
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 3 deletions.
47 changes: 47 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"md5": "^2.3.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Components/HomeBody/Login.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from "react";
import "./Login.css"
import "./Login.css";

const Login = () => {
const [nameInput, setNameInput] = useState("");
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/Components/HomeBody/Register.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { useState } from "react";
import "./Register.css"
import "./Register.css";

import md5 from "md5";

const Register = () => {
const [nameInput, setNameInput] = useState("");
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const jwt = require("jsonwebtoken");
const io = require("socket.io")(http);
const { v4: uuidv4 } = require("uuid");

const md5 = require("md5");
const jwt_decode = require("jwt-decode");
const querworkspace = require("./querworkspace");
const { link } = require("fs");
Expand Down Expand Up @@ -91,7 +92,7 @@ app.post("/register", async (req, res) => {
const result = await insertDb(
req.body.name,
req.body.email,
req.body.password
md5(req.body.password)
).catch(console.dir);
if (result) {
res.redirect("/chatroomoverview");
Expand Down
57 changes: 57 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"html-react-parser": "^0.14.0",
"jsonwebtoken": "^8.5.1",
"jwt-decode": "^3.0.0",
"md5": "^2.3.0",
"mongodb": "^3.6.2",
"nodemon": "^2.0.5",
"path": "^0.12.7",
Expand Down

0 comments on commit d8a0d12

Please sign in to comment.