From 1331fd19401971beb7d4b09e32d03d98e916b3b5 Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Date: Sun, 29 Sep 2024 11:05:55 -0300 Subject: [PATCH] Fixing "security issue" no. 2 and no. 3 --- commands/crew.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/crew.js b/commands/crew.js index 6181819..b18b0d6 100644 --- a/commands/crew.js +++ b/commands/crew.js @@ -4,6 +4,7 @@ const { isOnSpamWatch } = require('../plugins/lib-spamwatch/spamwatch.js'); const spamwatchMiddleware = require('../plugins/lib-spamwatch/Middleware.js')(isOnSpamWatch); const os = require('os'); const { exec } = require('child_process'); +const { error } = require('console'); function getGitCommitHash() { return new Promise((resolve, reject) => { @@ -126,7 +127,7 @@ module.exports = (bot) => { const botName = ctx.message.text.split(' ').slice(1).join(' '); handleAdminCommand(ctx, async () => { await ctx.telegram.setMyName(botName); - }, Strings.botNameChanged.replace('{botName}', botName), Strings.botNameErr.replace('{error}', '{error}')); + }, Strings.botNameChanged.replace('{botName}', botName), Strings.botNameErr.replace('{error}', error)); }); bot.command('setbotdesc', spamwatchMiddleware, async (ctx) => { @@ -134,7 +135,7 @@ module.exports = (bot) => { const botDesc = ctx.message.text.split(' ').slice(1).join(' '); handleAdminCommand(ctx, async () => { await ctx.telegram.setMyDescription(botDesc); - }, Strings.botDescChanged.replace('{botDesc}', botDesc), Strings.botDescErr.replace('{error}', '{error}')); + }, Strings.botDescChanged.replace('{botDesc}', botDesc), Strings.botDescErr.replace('{error}', error)); }); bot.command('botkickme', spamwatchMiddleware, async (ctx) => {