Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Adding support to SSLv3 to TLS #160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Some features:
in_reply_to: <[email protected]>
# Optional unsigned/invalid certificates allowance:
ignore_cert: true
# Optional Sets the secure SSL version v3
ciphers_sslv3: true
# Optional converting Markdown to HTML (set content_type to text/html too):
convert_markdown: true
# Optional attachments:
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ inputs:
ignore_cert:
description: Allow unsigned/invalid certificates
required: false
ciphers_sslv3:
description: Sets the secure SSL version v3
required: true
convert_markdown:
description: Convert body from Markdown to HTML (set content_type input as text/html too)
required: false
Expand Down
11 changes: 9 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async function main() {
const attachments = core.getInput("attachments", { required: false })
const convertMarkdown = core.getInput("convert_markdown", { required: false })
const ignoreCert = core.getInput("ignore_cert", { required: false })
const ciphersSSLv3 = core.getInput("ciphers_sslv3", { required: false })
const priority = core.getInput("priority", { required: false })

if (!serverAddress) {
Expand All @@ -100,7 +101,7 @@ async function main() {
core.warning("Username and password not specified. You should only do this if you are using a self-hosted runner to access an on-premise mail server.")
}

const transport = nodemailer.createTransport({
const transportOptions = {
host: serverAddress,
auth: username && password ? {
user: username,
Expand All @@ -111,7 +112,13 @@ async function main() {
tls: ignoreCert == "true" ? {
rejectUnauthorized: false
} : undefined,
})
}

if (ignoreCert == "true" && ciphersSSLv3 == "true") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should check for the ignore_cert input

transportOptions.tls.ciphers = 'SSLv3'
}

const transport = nodemailer.createTransport(transportOptions)

const info = await transport.sendMail({
from: getFrom(from, username),
Expand Down