From 569e8fbc70e1d29c77845a7b2e46c3332f914170 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Wed, 16 Oct 2024 10:35:29 +0200 Subject: [PATCH 1/4] Fix typos in comments for better readability Corrected spelling errors in comments for "challenge" and "compatibility" to improve clarity. This ensures better understanding and adherence to the documented IETF draft standard. --- smtp/auth_login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smtp/auth_login.go b/smtp/auth_login.go index 847ad62..a9bbdf5 100644 --- a/smtp/auth_login.go +++ b/smtp/auth_login.go @@ -29,7 +29,7 @@ type loginAuth struct { // See: https://datatracker.ietf.org/doc/html/draft-murchison-sasl-login-00 // Since there is no official standard RFC and we've seen different implementations // of this mechanism (sending "Username:", "Username", "username", "User name", etc.) -// we follow the IETF-Draft and ignore any server challange to allow compatiblity +// we follow the IETF-Draft and ignore any server challenge to allow compatibility // with most mail servers/providers. // // LoginAuth will only send the credentials if the connection is using TLS From f120485c98f563e64a902844115cacde5e28fb5f Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Wed, 16 Oct 2024 10:37:13 +0200 Subject: [PATCH 2/4] Correct typo in comment Fix a typo in smtp_test.go's comment from "challanges" to "challenges" to improve readability and accuracy of documentation. This change does not affect the code's functionality. --- smtp/smtp_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smtp/smtp_test.go b/smtp/smtp_test.go index 52b6b5a..c0e7197 100644 --- a/smtp/smtp_test.go +++ b/smtp/smtp_test.go @@ -2163,7 +2163,7 @@ func SkipFlaky(t testing.TB, issue int) { } // testSCRAMSMTPServer represents a test server for SCRAM-based SMTP authentication. -// It does not do any acutal computation of the challanges but verifies that the expected +// It does not do any acutal computation of the challenges but verifies that the expected // fields are present. We have actual real authentication tests for all SCRAM modes in the // go-mail client_test.go type testSCRAMSMTPServer struct { From fb14e1e7ddf2e96d93ed799f0fbf48d2d2cca8ca Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Wed, 16 Oct 2024 10:38:13 +0200 Subject: [PATCH 3/4] Fix typos in auth mechanism comments Corrected multiple instances of "mechansim" to "mechanism" in the comments describing SASL authentication methods to improve readability and maintain code quality. --- auth.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auth.go b/auth.go index a088274..7888819 100644 --- a/auth.go +++ b/auth.go @@ -35,7 +35,7 @@ const ( // IETF draft. The IETF draft is more lax than the MS spec, therefore we follow the I-D, which // automatically matches the MS spec. // - // Since the "LOGIN" SASL authentication mechansim transmits the username and password in + // Since the "LOGIN" SASL authentication mechanism transmits the username and password in // plaintext over the internet connection, we only allow this mechanism over a TLS secured // connection. // @@ -51,7 +51,7 @@ const ( // SMTPAuthPlain is the "PLAIN" authentication mechanism as described in RFC 4616. // - // Since the "PLAIN" SASL authentication mechansim transmits the username and password in + // Since the "PLAIN" SASL authentication mechanism transmits the username and password in // plaintext over the internet connection, we only allow this mechanism over a TLS secured // connection. // @@ -76,7 +76,7 @@ const ( // // SCRAM-SHA-X-PLUS authentication require TLS channel bindings to protect against MitM attacks and // to guarantee that the integrity of the transport layer is preserved throughout the authentication - // process. Therefore we only allow this mechansim over a TLS secured connection. + // process. Therefore we only allow this mechanism over a TLS secured connection. // // SCRAM-SHA-1-PLUS is still considered secure for certain applications, particularly when used as part // of a challenge-response authentication mechanism (as we use it). However, it is generally @@ -95,7 +95,7 @@ const ( // // SCRAM-SHA-X-PLUS authentication require TLS channel bindings to protect against MitM attacks and // to guarantee that the integrity of the transport layer is preserved throughout the authentication - // process. Therefore we only allow this mechansim over a TLS secured connection. + // process. Therefore we only allow this mechanism over a TLS secured connection. // // https://datatracker.ietf.org/doc/html/rfc7677 SMTPAuthSCRAMSHA256PLUS SMTPAuthType = "SCRAM-SHA-256-PLUS" From a638090d0e5dc513c96f6c86c88f46cae5f0c31e Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Wed, 16 Oct 2024 10:38:40 +0200 Subject: [PATCH 4/4] Fix typo in multipart comment Corrected the spelling of "seperately" to "separately" in a comment explaining the parsing of multipart/related and multipart/alternative parts. --- eml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eml.go b/eml.go index 35cd90d..17077a3 100644 --- a/eml.go +++ b/eml.go @@ -383,7 +383,7 @@ ReadNextPart: return fmt.Errorf("failed to get next part of multipart message: %w", err) } for err == nil { - // Multipart/related and Multipart/alternative parts need to be parsed seperately + // Multipart/related and Multipart/alternative parts need to be parsed separately if contentTypeSlice, ok := multiPart.Header[HeaderContentType.String()]; ok && len(contentTypeSlice) == 1 { contentType, _ := parseMultiPartHeader(contentTypeSlice[0]) if strings.EqualFold(contentType, TypeMultipartRelated.String()) ||