From 5857833945f11fdf33ed1cb90f8dd94b3874f1f7 Mon Sep 17 00:00:00 2001 From: Cody Maffucci <46459665+Maffooch@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:17:29 -0600 Subject: [PATCH] Add logging statement for failed password reset validation logic (#9087) --- docker/entrypoint-uwsgi-dev.sh | 2 +- dojo/user/views.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint-uwsgi-dev.sh b/docker/entrypoint-uwsgi-dev.sh index 0cf7e9bfae..587452cd0f 100755 --- a/docker/entrypoint-uwsgi-dev.sh +++ b/docker/entrypoint-uwsgi-dev.sh @@ -8,7 +8,7 @@ cd /app DD_UWSGI_LOGFORMAT_DEFAULT='[pid: %(pid)|app: -|req: -/-] %(addr) (%(dd_user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core))' -if [ ${DD_DEBUG} == "True" ]; then +if [ ${DD_DEBUG} = "True" ]; then echo "Debug mode enabled, reducing # of processes and threads to 1" DD_UWSGI_NUM_OF_PROCESSES=1 DD_UWSGI_NUM_OF_THREADS=1 diff --git a/dojo/user/views.py b/dojo/user/views.py index ca53c7c6f5..ebbd6cad25 100644 --- a/dojo/user/views.py +++ b/dojo/user/views.py @@ -643,7 +643,8 @@ def clean(self): if isinstance(connection, EmailBackend): connection.open() connection.close() - except Exception: + except Exception as e: + logger.error(f"SMTP Server Connection Failure: {str(e)}") raise ValidationError("SMTP server is not configured correctly...")