Commit 3894437
committed
ValidatedSanitizedInput: allow for validation using key_exists()
This builds onto the previous enhancement made in 1635 which started recognizing `array_key_exists()` as a way to validate a variable.
`key_exists()` is an alias for `array_key_exists()` and while alias functions shouldn't be used, for the purposes of the ValidatedSanitizedInput sniff, both functions should be recognized.
Includes unit test.
Notes:
* Removes the `array_key_exists()` method from the list of `$sanitizingFunctions` as it doesn't belong there and is now handled differently anyway (this should have been removed in 1635).
* Updates the version numbers for the change in the method documentation. We never released version 2.0.1, so both this change as well as the one from 1635 will now be released in 2.1.0.1 parent 2a0f154 commit 3894437
File tree
2 files changed
+20
-8
lines changed- WordPress
- Tests/Security
2 files changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
| |||
1437 | 1436 | | |
1438 | 1437 | | |
1439 | 1438 | | |
1440 | | - | |
1441 | | - | |
| 1439 | + | |
| 1440 | + | |
1442 | 1441 | | |
1443 | 1442 | | |
1444 | 1443 | | |
| |||
1465 | 1464 | | |
1466 | 1465 | | |
1467 | 1466 | | |
1468 | | - | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1469 | 1473 | | |
1470 | 1474 | | |
1471 | 1475 | | |
| |||
1845 | 1849 | | |
1846 | 1850 | | |
1847 | 1851 | | |
1848 | | - | |
| 1852 | + | |
| 1853 | + | |
1849 | 1854 | | |
1850 | 1855 | | |
1851 | 1856 | | |
| |||
1868 | 1873 | | |
1869 | 1874 | | |
1870 | 1875 | | |
1871 | | - | |
| 1876 | + | |
1872 | 1877 | | |
1873 | 1878 | | |
1874 | 1879 | | |
| |||
1982 | 1987 | | |
1983 | 1988 | | |
1984 | 1989 | | |
1985 | | - | |
1986 | | - | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
1987 | 1994 | | |
1988 | 1995 | | |
1989 | 1996 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
0 commit comments