This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Commit 52542d3
committed
Use string format type of 'ipv4' to validate comment author IP address
New function `rest_is_ip_address()` checks if a value is a valid v4 IP address. It uses regex because core cannot guarantee support for `filter_var`.1 parent 377c48d commit 52542d3
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
| 751 | + | |
756 | 752 | | |
757 | 753 | | |
758 | 754 | | |
| |||
811 | 807 | | |
812 | 808 | | |
813 | 809 | | |
| 810 | + | |
814 | 811 | | |
815 | 812 | | |
816 | 813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
| |||
395 | 400 | | |
396 | 401 | | |
397 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
402 | 410 | | |
403 | 411 | | |
404 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
0 commit comments