Compare commits
No commits in common. "fb18dae0a8bad235501585142b79edb3da2e87a9" and "f1b6da19a26f1cd6e277d18b4d26f1c56f83ef18" have entirely different histories.
fb18dae0a8
...
f1b6da19a2
2 changed files with 8 additions and 2 deletions
|
@ -106,7 +106,6 @@ class GatewayServer extends EventEmitter {
|
|||
const message = parseMessage(data.toString());
|
||||
switch (message.opcodeType) {
|
||||
case "YOO": {
|
||||
if (ws.session.authenticated) return closeConnectionWithCode(ws, wsCloseCodes.PAYLOAD_ERROR);
|
||||
// The client has responded to our HELLO with a YOO packet
|
||||
try {
|
||||
const user = await checkToken(message.data.token);
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
module.exports = {
|
||||
jwtPrivateKey: "KEY",
|
||||
jwtPrivateKey: "KjEY",
|
||||
};
|
||||
|
||||
// Set default values
|
||||
// You shouldn't need to touch this for configuring this
|
||||
if (module.exports.jwtPrivateKey === "KEY") {
|
||||
console.error("[*] [config] jwtPrivateKey was not specified in secret.js. A randomly generated private key will be used instead.");
|
||||
module.exports.jwtPrivateKey = require("crypto").randomBytes(129).toString("base64");
|
||||
}
|
||||
|
|
Reference in a new issue