`smtps://` email connection string without a port connects to port 25 with no TLS
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
まず src/Exceptionless.Core/Utility/SmtpUri.cs と src/Exceptionless.Core/Configuration/EmailOptions.cs を確認し、生成された暗号化オプションが MailKitMailSender に渡されるまでの流れを追ってください。説明に従って smtp://host、smtps://host、smtps://host:587 のテストを追加し、該当するテストを実行してください。smtps URI がセキュアなトランスポートを維持し、期待されるポートと TLS モードを選択すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
SmtpUri sets port 465 for an smtps:// URI with no explicit port, then overwrites it with 25 a few lines later. Because the encryption default is derived from the port, the mailer then connects to port 25 with no TLS. The parsed IsSecure flag is never used.
Where
SmtpUriconstructor setsPort = uri.IsDefaultPort ? 465 : uri.Portforsmtps, then L41 unconditionally runsPort = uri.IsDefaultPort ? 25 : uri.Port.System.Urihas no default port forsmtps, soIsDefaultPortistrueandPortis-1whenever the port is omitted.EmailOptions.ReadFromConfigurationcopies host, port, user and password but notIsSecure, and defaultsSmtpEncryptionfrom the port viaGetDefaultSmtpEncryption(25 maps toNone).MailKitMailSenderconnects withSecureSocketOptions.Noneand then authenticates.
Steps to reproduce
- Set
EX_ConnectionStrings__Email=smtps://user:[email protected](no port) and leaveEX_SmtpEncryptionunset. - Trigger any email (e.g. a password reset). The mailer connects to
smtp.example.com:25without TLS and sendsAUTHwith the credentials in the clear, or fails if port 25 is blocked or the server requires TLS.
Expected
smtps://host connects to port 465 with implicit TLS (SslOnConnect). More generally, the smtps scheme should select TLS regardless of port.
Suggested fix
Remove the trailing Port = uri.IsDefaultPort ? 25 : uri.Port; in SmtpUri (the scheme branches already set the port). In EmailOptions, when SmtpEncryption isn't configured and uri.IsSecure is true, default to SSL for port 465 and StartTLS for other ports instead of None. Add SmtpUri tests for smtp://host, smtps://host, and smtps://host:587.
- 主要言語
- C#
- スター
- 2.5k
- フォーク
- 508
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
exceptionless/Exceptionless のほかの issue
-
bug documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
exceptionless/Exceptionless#2707 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
exceptionless/Exceptionless#2706 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
exceptionless/Exceptionless#2705 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
exceptionless/Exceptionless#2704 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
exceptionless/Exceptionless#2703 ·
メンテナーはふだん 1 日以内に返信
exceptionless/Exceptionless の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
MahdiyarGHD/GheychiApp#39 ·
メンテナーはふだん 1 日以内に返信
-
bug effort:S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
nightscout/nocturne#3136 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
GameShowLDA/AskMkiM#1075 ·
メンテナーはふだん 1 日以内に返信