Skip to content

[Email Publisher] SMTP_PASS _ Authentication Issue when the password contains quote(s) #1253

@AnthoFio

Description

@AnthoFio

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

When the SMTP password contains one or several quotes, NetAlertX fails to authenticate with the SMTP server. The password is truncated at the quote during parsing, causing the plugin to send an incomplete password.

Quick analysis:
The function get_setting_value("SMTP_PASS") reads from app.conf where SMTP_PASS is stored with simple quotes. If the password contains a single quote ('), it is truncated during parsing, causing the authentication to fail.

Workaround:
Remove the single quote from the password.

Suggested fix:
Escape or properly parse passwords containing quotes in app.conf.

Expected Behavior

SMTP authentication succeeds. Email received

Steps To Reproduce

  1. Configure the Email publisher SMTP with a password containing a single quote, e.g., pa'ssword123.
  2. Save your config.
  3. Test your settings

app.conf

SMTP_PASS='pa'ssword123!_'

docker-compose.yml

What installation are you running?

Production (netalertx)

app.log

[Plugins] Output: [plugin_helper] reading config file
ERROR: Couldn't connect to the SMTP server (SMTPAuthenticationError)
ERROR: Double-check your SMTP_USER and SMTP_PASS settings.
ERROR: (535, b'5.7.8 Error: authentication failed: (reason unavailable)')

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Docker 🐋Docker relatedbug 🐛Something isn't workingnext release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions