Debian Codegraph @

t/additional-tests-draft4/format-ipv4.json

raw
1 [
2 {
3 "description": "validation of ipv4 strings",
4 "schema": {
5 "format": "ipv4"
6 },
7 "tests": [
8 {
9 "description": "leading zeroes should be rejected, as they are treated as octal values",
10 "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/",
11 "data": "087.10.0.1",
12 "valid": false
13 },
14 {
15 "description": "leading zeroes should be rejected, even if not a valid octal value",
16 "data": "099.10.0.1",
17 "valid": false
18 },
19 {
20 "description": "value without leading zero is valid",
21 "data": "87.10.0.1",
22 "valid": true
23 },
24 {
25 "description": "non-ascii digits should be rejected",
26 "data": "1২7.0.0.1",
27 "valid": false
28 }
29 ]
30 }
31 ]