-
Notifications
You must be signed in to change notification settings - Fork 660
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
テキストメール用の Escaper を実装 #5077
Merged
chihiro-adachi
merged 4 commits into
EC-CUBE:4.1-core
from
nanasess:improve-safe_textmail
Jul 6, 2021
Merged
テキストメール用の Escaper を実装 #5077
chihiro-adachi
merged 4 commits into
EC-CUBE:4.1-core
from
nanasess:improve-safe_textmail
Jul 6, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- htmlspecialchars() を使用すると、テキストメールの見た目が損なわれた、URLが無効化されてしまったりするため、テキストメール用の Escaper を実装する - `<`, `>` を全角文字に置換することで XSS を防止する - `{% autoescape 'safe_textmail' %}{% endautoescape %}` として使用可能
ユニットテストを追加し、 WIP はずしました |
@nanasess テストが落ちているのご確認おねがいできますでしょうか。 |
nanasess
force-pushed
the
improve-safe_textmail
branch
from
July 5, 2021 09:20
8bf8ac7
to
b1327a7
Compare
@chihiro-adachi |
@chihiro-adachi 本件とは関係ない箇所ですので一旦は問題ないかなと思います |
@nanasess |
okazy
added a commit
that referenced
this pull request
Jul 7, 2021
テキストメール用の Escaper を実装 #5077 を4.1ブランチへ反映
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要(Overview・Refs Issue)
方針(Policy)
<
,>
を全角文字に置換することで XSS を防止する{% autoescape 'safe_textmail' %}{% endautoescape %}
として使用可能実装に関する補足(Appendix)
src/Eccube/Resource/template/default/Mail/shipping_notify.html.twig
を削除する{% autoescape false %}{% endautoescape %}
を削除するこの Escaper を使用することで、
<
,>
のみ全角文字に置換することで、極力メールの見た目を損なうことなく、安全にテキストメールを送信することができるテスト(Test)
ユニットテストを追加
相談(Discussion)
エスケープ方法は妙案浮ばなかったので、とりあえず
<
,>
を全角文字に置換してます。もっと良いエスケープ方法がありましたらご意見ください
マイナーバージョン互換性保持のための制限事項チェックリスト
レビュワー確認項目