diff --git a/public/news/2019-06-11-03.md b/public/news/2019-06-11-03.md new file mode 100644 index 0000000..51cc642 --- /dev/null +++ b/public/news/2019-06-11-03.md @@ -0,0 +1,6 @@ +Hacking Attempts +--- +_11 June 2019_ + +A hacking attempt was witnessed, and a security hole has been patched. Please log out and log back in to fix any errors you are currently having. + diff --git a/server/accounts.js b/server/accounts.js index 4dd1ead..11a53b8 100644 --- a/server/accounts.js +++ b/server/accounts.js @@ -216,7 +216,7 @@ const loginRequest = (connection) => (req, res) => { } //create the new session - let rand = Math.floor(Math.random() * 100000); + let rand = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER); let query = 'INSERT INTO sessions (accountId, token) VALUES (?, ?);'; connection.query(query, [results[0].id, rand], (err) => {