mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-09-17 09:06:48 +07:00
Add require_tls input to prevent STARTTLS fallback to plain text (#317)
Expose nodemailer's requireTLS option so that when secure is false (e.g. STARTTLS on port 587), the connection aborts if the server does not support/negotiate STARTTLS, instead of silently sending credentials in clear text.
This commit is contained in:
@@ -94,6 +94,7 @@ async function main() {
|
||||
let serverAddress = core.getInput("server_address");
|
||||
let serverPort = core.getInput("server_port");
|
||||
let secure = core.getInput("secure");
|
||||
const requireTLS = core.getInput("require_tls", { required: false });
|
||||
let username = core.getInput("username");
|
||||
let password = core.getInput("password");
|
||||
|
||||
@@ -196,6 +197,7 @@ async function main() {
|
||||
: undefined,
|
||||
port: serverPort,
|
||||
secure: secure === "true",
|
||||
requireTLS: requireTLS === "true",
|
||||
tls:
|
||||
ignoreCert == "true"
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user