Commit f165714
committed
Security/EscapeOutput: special case get_search_query( false )
As per the reported issue, `get_search_query()` is unsafe when the `$escaped` parameter is set, but not set to `true`.
This commit special cases the function and checks the parameter. If the parameter is passed, but not set to `true`, a custom error message will be thrown.
Includes tests.
Fixes 13541 parent 2db499f commit f165714
File tree
3 files changed
+22
-0
lines changed- WordPress
- Sniffs/Security
- Tests/Security
3 files changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
722 | 734 | | |
723 | 735 | | |
724 | 736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
0 commit comments