mail() truncates message on full stop between two newlines
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.1k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
The following code:
<?php
mail("myself@mydomain.com", "Subject whatever", "Foo bar\n\nWhatever\n\n.\n\nLorem ipsum dolor sit amet");
Resulted in this email body being sent:
Foo bar
Whatever
(not sure whether with or without the \ns at the end and how many of them)
But I expected this output instead:
Foo bar
Whatever
.
Lorem ipsum dolor sit amet
I know that a line with only a full stop is how the email body is terminated in the SMTP protocol, but this is not the SMTP protocol, this is a php function that takes a message and sends it via email. If the caller is supposed to encode the message the way it would be encoded in the SMTP protocol, the docs should say so; but again, that would be stupid.
PHP Version
8.0.12
Operating System
debian 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、PHP の mail() 実装と、ローカルメールトランスポート用にメッセージ本文をシリアライズするパスを特定します。次に、提示された PHP 8.0.12 の例を再現し、その後、ピリオドだけを含む行が保持され、期待される完全な本文が送信されるように、リグレッションテストを追加または更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100