Commit d43381a
committed
Sniff::is_sanitized(): make the method more code style independent
Whether people comply with the WP style rules regarding whitespace and such, is irrelevant for determining whether or not a value is sanitized/unslashed.
This fixed a false positive where superglobals which were correctly unslashed/sanitized were not being recognized as such.
Includes unit test in the `ValidatedSanitizedInput` sniff.1 parent 5f27d8e commit d43381a
File tree
2 files changed
+16
-13
lines changed- WordPress
- Tests/Security
2 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
| 1575 | + | |
1575 | 1576 | | |
1576 | 1577 | | |
1577 | 1578 | | |
1578 | 1579 | | |
1579 | 1580 | | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
1583 | 1584 | | |
1584 | 1585 | | |
1585 | | - | |
| 1586 | + | |
1586 | 1587 | | |
1587 | 1588 | | |
1588 | 1589 | | |
1589 | | - | |
1590 | | - | |
| 1590 | + | |
| 1591 | + | |
1591 | 1592 | | |
1592 | 1593 | | |
1593 | 1594 | | |
| 1595 | + | |
1594 | 1596 | | |
1595 | 1597 | | |
1596 | 1598 | | |
1597 | | - | |
| 1599 | + | |
1598 | 1600 | | |
1599 | 1601 | | |
1600 | 1602 | | |
1601 | 1603 | | |
1602 | 1604 | | |
1603 | | - | |
| 1605 | + | |
1604 | 1606 | | |
1605 | 1607 | | |
1606 | | - | |
| 1608 | + | |
1607 | 1609 | | |
1608 | 1610 | | |
1609 | 1611 | | |
1610 | | - | |
1611 | | - | |
| 1612 | + | |
| 1613 | + | |
1612 | 1614 | | |
1613 | 1615 | | |
1614 | | - | |
1615 | 1616 | | |
1616 | 1617 | | |
1617 | 1618 | | |
1618 | 1619 | | |
1619 | 1620 | | |
1620 | 1621 | | |
1621 | 1622 | | |
1622 | | - | |
| 1623 | + | |
1623 | 1624 | | |
1624 | 1625 | | |
1625 | 1626 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
0 commit comments