Skip to content

Commit a23cfc5

Browse files
authored
Merge pull request #27 from BetterMint/alert-autofix-21
Potential fix for code scanning alert no. 21: Information exposure through an exception
2 parents 249dc7f + 9776619 commit a23cfc5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BetterMITM/tools/web/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,8 @@ def post(self, cmd: str):
844844
try:
845845
result = self.master.commands.call_strings(cmd, args)
846846
except Exception as e:
847-
self.write({"error": str(e)})
847+
logger.exception("Failed to execute command '%s' with args: %r", cmd, args)
848+
self.write({"error": "An internal error occurred."})
848849
else:
849850
self.write(
850851
{

0 commit comments

Comments
 (0)