From 83a5df31b9b30f5f1bf92f9611573fc9ce0c5916 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:24:24 +0000 Subject: [PATCH 1/6] Added console output --- src/commands/pull.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/pull.ts b/src/commands/pull.ts index 9c216e5..f6981e3 100644 --- a/src/commands/pull.ts +++ b/src/commands/pull.ts @@ -25,7 +25,7 @@ export default class Pull extends Command { if (pull.includes('Already up to date')) return updateMessage.edit(`${this.client.stores.emojis.success} ***No updates available***`); if (!pull.includes('origin/master')) return updateMessage.edit(`${this.client.stores.emojis.error} ***Unexpected output:***\n\`\`\`sh\n${pull}\n\`\`\``); - const passedPull = await updateMessage.edit(`${this.client.stores.emojis.success} ***Pulled latest commit***\n${this.client.stores.emojis.loading} ***Rebuilding files...***`); + const passedPull = await updateMessage.edit(`${this.client.stores.emojis.success} ***Pulled latest commit***\n${this.client.stores.emojis.loading} ***Rebuilding files...***\n\`\`\`sh\n${pull}\\n\`\`\``); try { await this.client.util.exec('cd ../ && tsc -p ./tsconfig.json'); } catch (error) { From c95ecd3aa3bf41c9d39cafdba5aa10db5b266824 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:38:11 +0000 Subject: [PATCH 2/6] security patch --- src/commands/eval.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 698ebd5..72066f1 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -32,19 +32,16 @@ export default class Eval extends Command { evaled = error.stack; } - /* - if (output) { - output = output.replace(RegExp(this.client.config.prefix, 'gi'), 'juul'); - output = output.replace(RegExp(this.client.config.emailPass, 'gi'), 'juul'); - output = output.replace(RegExp(this.client.config.cloudflare, 'gi'), 'juul'); - } - */ + evaled = evaled.replace(RegExp(this.client.config.prefix, 'gi'), 'juul'); + evaled = evaled.replace(RegExp(this.client.config.emailPass, 'gi'), 'juul'); + evaled = evaled.replace(RegExp(this.client.config.cloudflare, 'gi'), 'juul'); + const display = this.client.util.splitString(evaled, 1975); if (display[5]) { try { const { data } = await axios.post('https://snippets.cloud.libraryofcode.org/documents', display.join('')); - return message.channel.createMessage(`${this.client.stores.emojis.success} Your evaluation output can be found on https://snippets.cloud.libraryofcode.org/${data.key}`); + return message.channel.createMessage(`${this.client.stores.emojis.success} Your evaluation evaled can be found on https://snippets.cloud.libraryofcode.org/${data.key}`); } catch (error) { return message.channel.createMessage(`${this.client.stores.emojis.error} ${error}`); } From b9730d9bf733de53aa9cdb15630a049f65adf2d9 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:40:57 +0000 Subject: [PATCH 3/6] Actually fix the security vuln --- src/commands/eval.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 72066f1..4cd0d2e 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -32,9 +32,9 @@ export default class Eval extends Command { evaled = error.stack; } - evaled = evaled.replace(RegExp(this.client.config.prefix, 'gi'), 'juul'); - evaled = evaled.replace(RegExp(this.client.config.emailPass, 'gi'), 'juul'); - evaled = evaled.replace(RegExp(this.client.config.cloudflare, 'gi'), 'juul'); + evaled = evaled.replace(new RegExp(this.client.config.prefix, 'gi'), 'juul'); + evaled = evaled.replace(new RegExp(this.client.config.emailPass, 'gi'), 'juul'); + evaled = evaled.replace(new RegExp(this.client.config.cloudflare, 'gi'), 'juul'); const display = this.client.util.splitString(evaled, 1975); From 297218abdf560d7cc30c2565227e6d366010584d Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:42:03 +0000 Subject: [PATCH 4/6] Fix newline --- src/commands/pull.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/pull.ts b/src/commands/pull.ts index f6981e3..4686365 100644 --- a/src/commands/pull.ts +++ b/src/commands/pull.ts @@ -25,7 +25,7 @@ export default class Pull extends Command { if (pull.includes('Already up to date')) return updateMessage.edit(`${this.client.stores.emojis.success} ***No updates available***`); if (!pull.includes('origin/master')) return updateMessage.edit(`${this.client.stores.emojis.error} ***Unexpected output:***\n\`\`\`sh\n${pull}\n\`\`\``); - const passedPull = await updateMessage.edit(`${this.client.stores.emojis.success} ***Pulled latest commit***\n${this.client.stores.emojis.loading} ***Rebuilding files...***\n\`\`\`sh\n${pull}\\n\`\`\``); + const passedPull = await updateMessage.edit(`${this.client.stores.emojis.success} ***Pulled latest commit***\n${this.client.stores.emojis.loading} ***Rebuilding files...***\n\`\`\`sh\n${pull}\n\`\`\``); try { await this.client.util.exec('cd ../ && tsc -p ./tsconfig.json'); } catch (error) { From 6489a176c526f2c6f22ac26379b3d60d27ef612e Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:43:33 +0000 Subject: [PATCH 5/6] Third time lucky --- src/commands/eval.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 4cd0d2e..5e4f6f1 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -32,7 +32,7 @@ export default class Eval extends Command { evaled = error.stack; } - evaled = evaled.replace(new RegExp(this.client.config.prefix, 'gi'), 'juul'); + evaled = evaled.replace(new RegExp(this.client.config.token, 'gi'), 'juul'); evaled = evaled.replace(new RegExp(this.client.config.emailPass, 'gi'), 'juul'); evaled = evaled.replace(new RegExp(this.client.config.cloudflare, 'gi'), 'juul'); From 094a59d45d313091b8fa899adf939e9e09d9c086 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 22:04:03 +0000 Subject: [PATCH 6/6] Updated link --- src/commands/createaccount.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/createaccount.ts b/src/commands/createaccount.ts index 174bbff..89339d4 100644 --- a/src/commands/createaccount.ts +++ b/src/commands/createaccount.ts @@ -78,7 +78,7 @@ export default class CreateAccount extends Command {

Useful information

How to log in:

    -
  1. Open your desired terminal application - we recommend using Bash, but you can use your computer's default
  2. +
  3. Open your desired terminal application - we recommend using Bash, but you can use your computer's default
  4. Type in your SSH Login as above
  5. When prompted, enter your password Please note that inputs will be blank, so be careful not to type in your password incorrectly