projectdiscovery / notify

Notify is a Go-based assistance package that enables you to stream the output of several tools (or read from a file) and publish it to a variety of supported platforms.

Home Page:https://projectdiscovery.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMTP fails when password contains octothorpe ("#") character

ossumpossum opened this issue · comments

Notify version: 1.0.4

Current Behavior: When attempting to use SMTP, I receive the following error:

[ERR] failed to send smtp notification for id: email : parse "smtp://test@example.com:xxxxx": invalid port ":xxxxx" after host

(output has been sanitized) The "xxxxx" is the first half of the password for the mailserver. It is terminated where an octothorpe ("#") appears in the password. I have attempted to escape the octothorpe with a backslash, as well as enclosing the password in either single or double quotes. All attempts generate the same error.

Expected Behavior: The SMTP functionality should accept passwords verbatim without attempting to interpret any characters as anything other than password characters.

Steps To Reproduce:

  1. Configure notify to attempt to use SMTP with a password that contains an octothorpe ("#")
  2. Run notify
  3. See error

@ossumpossum thanks for reporting this, now fixed in the latest release.