Skip to content

Commit

Permalink
get magic link without sending email in DEBUG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Nov 13, 2024
1 parent ca9442d commit 02bc25b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lacommunaute/notification/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ def send_email(to, params, template_id, kind, bcc=None):
if bcc:
payload["bcc"] = bcc

response = httpx.post(settings.SIB_SMTP_URL, headers=headers, json=payload)
if settings.DEBUG:
logger.warning(f"Email sent: {payload}")

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.
This log entry depends on a
user-provided value
.
response = httpx.Response(200, json={"message": "OK"})
else:
response = httpx.post(settings.SIB_SMTP_URL, headers=headers, json=payload)

EmailSentTrack.objects.create(
status_code=response.status_code,
Expand Down

0 comments on commit 02bc25b

Please sign in to comment.