Commit c088b1b
committed
Sniff::$unslashingSanitizingFunctions: add doubleval() and count()
While `doubleval()` is an alias of `floatval()` and shouldn't be used, for the purposes of the ValidatedSanitizedInput sniff, both functions should be recognized.
And as `count()` doesn't actually access the data in the variable, but only counts the number of elements, it is also safe to use without unslashing/sanitizing the variable beforehand.
Same goes for the `sizeof()` alias of `count()`.
Includes unit tests.
Fixes 16591 parent 8fa98f6 commit c088b1b
File tree
2 files changed
+12
-0
lines changed- WordPress
- Tests/Security
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
0 commit comments