Skip to content

Commit 8377e43

Browse files
Merge pull request #22 from GitTimeraider/alert-autofix-11
Potential fix for code scanning alert no. 11: Information exposure through an exception
2 parents c1910ed + 84769c1 commit 8377e43

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/directadmin_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ def test_connection(self):
167167
return False, "Failed to connect. Please check your credentials."
168168

169169
except Exception as e:
170-
return False, f"Connection error: {str(e)}"
170+
import traceback
171+
print(f"Connection error: {str(e)}")
172+
traceback.print_exc()
173+
return False, "Connection error: Unable to connect to DirectAdmin."
171174

172175
def get_email_accounts(self):
173176
"""Get all email accounts for the domain"""

0 commit comments

Comments
 (0)