From c95ecd3aa3bf41c9d39cafdba5aa10db5b266824 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 20:38:11 +0000 Subject: [PATCH] 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}`); }