-
Notifications
You must be signed in to change notification settings - Fork 1
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
XSS 対応 #1101
Merged
XSS 対応 #1101
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9ce916a
fix: XSS
drill-lancer 011226c
fix: escape
drill-lancer 384470e
fix: post_type_manager
drill-lancer 564c846
fix: readme
drill-lancer 1af6ee6
fix: stripslashes
drill-lancer cab8505
add escape
kurudrive 8e27091
fix: escape cta
drill-lancer 5f279eb
コメントのみ
kurudrive 8fdfa02
add escape
kurudrive 3cfb45d
add escape
kurudrive dffea58
add escape
kurudrive c2f31cd
add escape
kurudrive 73bb9b1
add escape
kurudrive 8589855
add escape
kurudrive cfeaa1a
fix: tel_iconはfont awesomeのタグのみ許可
mthaichi 7415bb7
fix: space
mthaichi 911d533
add esc
kurudrive 02a8bb1
allow area hidden
kurudrive 552a6b2
Merge branch 'fix-area-hidden' into fix/xss
kurudrive 807a5a4
add esc
kurudrive File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drill-lancer この部分でstripslashesを削除しているので、例えば Vektor's といった文字列を保存しようとすると、バックスラッシュがテキストエリアに残り、それに気づかず保存すると、倍々にバックスラッシュが増えてしまいます。
ご存知のことかもしれませんが、
WordPressは $_POSTに対して、add_magic_quotes()をかけます。$_POSTには Vektor\'s という値で入ってきます。ですから、これに対して、wp_unslashやstripslashesで戻す処理は必要かと。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CTA関連でも同様の修正がありますが、こちらはupdate_metadata() 内で、wp_unslashが自動的にかかるのでバックスラッシュを外す処理は不要です。これに関してはstripslashesを通すのは無意味となるので、外して正解だと思います。