| 1 |
[ |
| 2 |
{ |
| 3 |
"description": "validation of internationalized host names", |
| 4 |
"schema": { "format": "idn-hostname" }, |
| 5 |
"tests": [ |
| 6 |
{ |
| 7 |
"description": "all string formats ignore integers", |
| 8 |
"data": 12, |
| 9 |
"valid": true |
| 10 |
}, |
| 11 |
{ |
| 12 |
"description": "all string formats ignore floats", |
| 13 |
"data": 13.7, |
| 14 |
"valid": true |
| 15 |
}, |
| 16 |
{ |
| 17 |
"description": "all string formats ignore objects", |
| 18 |
"data": {}, |
| 19 |
"valid": true |
| 20 |
}, |
| 21 |
{ |
| 22 |
"description": "all string formats ignore arrays", |
| 23 |
"data": [], |
| 24 |
"valid": true |
| 25 |
}, |
| 26 |
{ |
| 27 |
"description": "all string formats ignore booleans", |
| 28 |
"data": false, |
| 29 |
"valid": true |
| 30 |
}, |
| 31 |
{ |
| 32 |
"description": "all string formats ignore nulls", |
| 33 |
"data": null, |
| 34 |
"valid": true |
| 35 |
}, |
| 36 |
{ |
| 37 |
"description": "a valid host name (example.test in Hangul)", |
| 38 |
"data": "실례.테스트", |
| 39 |
"valid": true |
| 40 |
}, |
| 41 |
{ |
| 42 |
"description": "illegal first char U+302E Hangul single dot tone mark", |
| 43 |
"data": "〮실례.테스트", |
| 44 |
"valid": false |
| 45 |
}, |
| 46 |
{ |
| 47 |
"description": "contains illegal char U+302E Hangul single dot tone mark", |
| 48 |
"data": "실〮례.테스트", |
| 49 |
"valid": false |
| 50 |
}, |
| 51 |
{ |
| 52 |
"description": "a single label of 63 characters is valid", |
| 53 |
"data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", |
| 54 |
"valid": true |
| 55 |
}, |
| 56 |
{ |
| 57 |
"description": "a single label of 64 characters is too long", |
| 58 |
"data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", |
| 59 |
"valid": false |
| 60 |
}, |
| 61 |
{ |
| 62 |
"description": "invalid label, correct Punycode", |
| 63 |
"comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", |
| 64 |
"data": "-> $1.00 <--", |
| 65 |
"valid": false |
| 66 |
}, |
| 67 |
{ |
| 68 |
"description": "valid Chinese Punycode", |
| 69 |
"comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", |
| 70 |
"data": "xn--ihqwcrb4cv8a8dqg056pqjye", |
| 71 |
"valid": true |
| 72 |
}, |
| 73 |
{ |
| 74 |
"description": "invalid Punycode", |
| 75 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", |
| 76 |
"data": "xn--X", |
| 77 |
"valid": false |
| 78 |
}, |
| 79 |
{ |
| 80 |
"description": "U-label contains \"--\" in the 3rd and 4th position", |
| 81 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", |
| 82 |
"data": "XN--aa---o47jg78q", |
| 83 |
"valid": false |
| 84 |
}, |
| 85 |
{ |
| 86 |
"description": "U-label starts with a dash", |
| 87 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", |
| 88 |
"data": "-hello", |
| 89 |
"valid": false |
| 90 |
}, |
| 91 |
{ |
| 92 |
"description": "U-label ends with a dash", |
| 93 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", |
| 94 |
"data": "hello-", |
| 95 |
"valid": false |
| 96 |
}, |
| 97 |
{ |
| 98 |
"description": "U-label starts and ends with a dash", |
| 99 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", |
| 100 |
"data": "-hello-", |
| 101 |
"valid": false |
| 102 |
}, |
| 103 |
{ |
| 104 |
"description": "Begins with a Spacing Combining Mark", |
| 105 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", |
| 106 |
"data": "\u0903hello", |
| 107 |
"valid": false |
| 108 |
}, |
| 109 |
{ |
| 110 |
"description": "Begins with a Nonspacing Mark", |
| 111 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", |
| 112 |
"data": "\u0300hello", |
| 113 |
"valid": false |
| 114 |
}, |
| 115 |
{ |
| 116 |
"description": "Begins with an Enclosing Mark", |
| 117 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", |
| 118 |
"data": "\u0488hello", |
| 119 |
"valid": false |
| 120 |
}, |
| 121 |
{ |
| 122 |
"description": "Exceptions that are PVALID, left-to-right chars", |
| 123 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", |
| 124 |
"data": "\u00df\u03c2\u0f0b\u3007", |
| 125 |
"valid": true |
| 126 |
}, |
| 127 |
{ |
| 128 |
"description": "Exceptions that are PVALID, right-to-left chars", |
| 129 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", |
| 130 |
"data": "\u06fd\u06fe", |
| 131 |
"valid": true |
| 132 |
}, |
| 133 |
{ |
| 134 |
"description": "Exceptions that are DISALLOWED, right-to-left chars", |
| 135 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", |
| 136 |
"data": "\u0640\u07fa", |
| 137 |
"valid": false |
| 138 |
}, |
| 139 |
{ |
| 140 |
"description": "Exceptions that are DISALLOWED, left-to-right chars", |
| 141 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", |
| 142 |
"data": "\u3031\u3032\u3033\u3034\u3035\u302e\u302f\u303b", |
| 143 |
"valid": false |
| 144 |
}, |
| 145 |
{ |
| 146 |
"description": "MIDDLE DOT with no preceding 'l'", |
| 147 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 148 |
"data": "a\u00b7l", |
| 149 |
"valid": false |
| 150 |
}, |
| 151 |
{ |
| 152 |
"description": "MIDDLE DOT with nothing preceding", |
| 153 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 154 |
"data": "\u00b7l", |
| 155 |
"valid": false |
| 156 |
}, |
| 157 |
{ |
| 158 |
"description": "MIDDLE DOT with no following 'l'", |
| 159 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 160 |
"data": "l\u00b7a", |
| 161 |
"valid": false |
| 162 |
}, |
| 163 |
{ |
| 164 |
"description": "MIDDLE DOT with nothing following", |
| 165 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 166 |
"data": "l\u00b7", |
| 167 |
"valid": false |
| 168 |
}, |
| 169 |
{ |
| 170 |
"description": "MIDDLE DOT with surrounding 'l's", |
| 171 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", |
| 172 |
"data": "l\u00b7l", |
| 173 |
"valid": true |
| 174 |
}, |
| 175 |
{ |
| 176 |
"description": "Greek KERAIA not followed by Greek", |
| 177 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", |
| 178 |
"data": "\u03b1\u0375S", |
| 179 |
"valid": false |
| 180 |
}, |
| 181 |
{ |
| 182 |
"description": "Greek KERAIA not followed by anything", |
| 183 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", |
| 184 |
"data": "\u03b1\u0375", |
| 185 |
"valid": false |
| 186 |
}, |
| 187 |
{ |
| 188 |
"description": "Greek KERAIA followed by Greek", |
| 189 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", |
| 190 |
"data": "\u03b1\u0375\u03b2", |
| 191 |
"valid": true |
| 192 |
}, |
| 193 |
{ |
| 194 |
"description": "Hebrew GERESH not preceded by Hebrew", |
| 195 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", |
| 196 |
"data": "A\u05f3\u05d1", |
| 197 |
"valid": false |
| 198 |
}, |
| 199 |
{ |
| 200 |
"description": "Hebrew GERESH not preceded by anything", |
| 201 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", |
| 202 |
"data": "\u05f3\u05d1", |
| 203 |
"valid": false |
| 204 |
}, |
| 205 |
{ |
| 206 |
"description": "Hebrew GERESH preceded by Hebrew", |
| 207 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", |
| 208 |
"data": "\u05d0\u05f3\u05d1", |
| 209 |
"valid": true |
| 210 |
}, |
| 211 |
{ |
| 212 |
"description": "Hebrew GERSHAYIM not preceded by Hebrew", |
| 213 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", |
| 214 |
"data": "A\u05f4\u05d1", |
| 215 |
"valid": false |
| 216 |
}, |
| 217 |
{ |
| 218 |
"description": "Hebrew GERSHAYIM not preceded by anything", |
| 219 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", |
| 220 |
"data": "\u05f4\u05d1", |
| 221 |
"valid": false |
| 222 |
}, |
| 223 |
{ |
| 224 |
"description": "Hebrew GERSHAYIM preceded by Hebrew", |
| 225 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", |
| 226 |
"data": "\u05d0\u05f4\u05d1", |
| 227 |
"valid": true |
| 228 |
}, |
| 229 |
{ |
| 230 |
"description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", |
| 231 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 232 |
"data": "def\u30fbabc", |
| 233 |
"valid": false |
| 234 |
}, |
| 235 |
{ |
| 236 |
"description": "KATAKANA MIDDLE DOT with no other characters", |
| 237 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 238 |
"data": "\u30fb", |
| 239 |
"valid": false |
| 240 |
}, |
| 241 |
{ |
| 242 |
"description": "KATAKANA MIDDLE DOT with Hiragana", |
| 243 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 244 |
"data": "\u30fb\u3041", |
| 245 |
"valid": true |
| 246 |
}, |
| 247 |
{ |
| 248 |
"description": "KATAKANA MIDDLE DOT with Katakana", |
| 249 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 250 |
"data": "\u30fb\u30a1", |
| 251 |
"valid": true |
| 252 |
}, |
| 253 |
{ |
| 254 |
"description": "KATAKANA MIDDLE DOT with Han", |
| 255 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", |
| 256 |
"data": "\u30fb\u4e08", |
| 257 |
"valid": true |
| 258 |
}, |
| 259 |
{ |
| 260 |
"description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", |
| 261 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", |
| 262 |
"data": "\u0628\u0660\u06f0", |
| 263 |
"valid": false |
| 264 |
}, |
| 265 |
{ |
| 266 |
"description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", |
| 267 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", |
| 268 |
"data": "\u0628\u0660\u0628", |
| 269 |
"valid": true |
| 270 |
}, |
| 271 |
{ |
| 272 |
"description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits", |
| 273 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", |
| 274 |
"data": "\u06f00", |
| 275 |
"valid": true |
| 276 |
}, |
| 277 |
{ |
| 278 |
"description": "ZERO WIDTH JOINER not preceded by Virama", |
| 279 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", |
| 280 |
"data": "\u0915\u200d\u0937", |
| 281 |
"valid": false |
| 282 |
}, |
| 283 |
{ |
| 284 |
"description": "ZERO WIDTH JOINER not preceded by anything", |
| 285 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", |
| 286 |
"data": "\u200d\u0937", |
| 287 |
"valid": false |
| 288 |
}, |
| 289 |
{ |
| 290 |
"description": "ZERO WIDTH JOINER preceded by Virama", |
| 291 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", |
| 292 |
"data": "\u0915\u094d\u200d\u0937", |
| 293 |
"valid": true |
| 294 |
}, |
| 295 |
{ |
| 296 |
"description": "ZERO WIDTH NON-JOINER preceded by Virama", |
| 297 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", |
| 298 |
"data": "\u0915\u094d\u200c\u0937", |
| 299 |
"valid": true |
| 300 |
}, |
| 301 |
{ |
| 302 |
"description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp", |
| 303 |
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", |
| 304 |
"data": "\u0628\u064a\u200c\u0628\u064a", |
| 305 |
"valid": true |
| 306 |
}, |
| 307 |
{ |
| 308 |
"description": "single label", |
| 309 |
"data": "hostname", |
| 310 |
"valid": true |
| 311 |
}, |
| 312 |
{ |
| 313 |
"description": "single label with hyphen", |
| 314 |
"data": "host-name", |
| 315 |
"valid": true |
| 316 |
}, |
| 317 |
{ |
| 318 |
"description": "single label with digits", |
| 319 |
"data": "h0stn4me", |
| 320 |
"valid": true |
| 321 |
}, |
| 322 |
{ |
| 323 |
"description": "single label starting with digit", |
| 324 |
"data": "1host", |
| 325 |
"valid": true |
| 326 |
}, |
| 327 |
{ |
| 328 |
"description": "single label ending with digit", |
| 329 |
"data": "hostnam3", |
| 330 |
"valid": true |
| 331 |
}, |
| 332 |
{ |
| 333 |
"description": "empty string", |
| 334 |
"data": "", |
| 335 |
"valid": false |
| 336 |
}, |
| 337 |
{ |
| 338 |
"description": "fullwidth digits are mapped to ASCII digits", |
| 339 |
"comment": "IdnaMappingTable.txt maps U+FF11 to 0031, so this label maps to 123", |
| 340 |
"data": "\uff11\uff12\uff13", |
| 341 |
"valid": true |
| 342 |
}, |
| 343 |
{ |
| 344 |
"description": "a zero width space is ignored by the mapping", |
| 345 |
"comment": "IdnaMappingTable.txt lists U+200B as ignored, so this label maps to ab", |
| 346 |
"data": "a\u200bb", |
| 347 |
"valid": true |
| 348 |
}, |
| 349 |
{ |
| 350 |
"description": "an A-label with an uppercase Punycode body is valid", |
| 351 |
"comment": "https://www.rfc-editor.org/rfc/rfc5891#section-5.3 lowercases the A-label before the round-trip test, and RFC 3492 section 5 gives A-Z and a-z the same digit-values", |
| 352 |
"data": "xn--NXASMQ6B", |
| 353 |
"valid": true |
| 354 |
}, |
| 355 |
{ |
| 356 |
"description": "the two Arabic-Indic digit blocks may appear in different labels", |
| 357 |
"comment": "https://www.rfc-editor.org/rfc/rfc5892#appendix-A.8 scopes the rule to \"this label\", so one block per label is valid", |
| 358 |
"data": "\u0628\u0660.\u0628\u06f0", |
| 359 |
"valid": true |
| 360 |
}, |
| 361 |
{ |
| 362 |
"description": "a label of only Arabic-Indic digits is invalid", |
| 363 |
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2 condition 1 allows only L, R or AL as the first character, and an Arabic-Indic digit is AN", |
| 364 |
"data": "\u0660\u0661", |
| 365 |
"valid": false |
| 366 |
}, |
| 367 |
{ |
| 368 |
"description": "a non-NFC U-label is valid after UTS 46 normalisation", |
| 369 |
"comment": "UTS 46 section 4 normalises to NFC before validating, so the decomposed form is accepted", |
| 370 |
"data": "cafe\u0301.com", |
| 371 |
"valid": true |
| 372 |
}, |
| 373 |
{ |
| 374 |
"description": "a label of 63 fullwidth characters is valid after mapping", |
| 375 |
"comment": "UTS 46 maps each U+FF41 to an ASCII letter, so this label is 63 octets in its mapped form", |
| 376 |
"data": "\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41\uff41", |
| 377 |
"valid": true |
| 378 |
}, |
| 379 |
{ |
| 380 |
"description": "an ACE prefix produced by the mapping step is decoded as an A-label", |
| 381 |
"comment": "UTS 46 maps U+FF58 U+FF4E to \"xn\", so the mapped label is the A-label xn--nxasmq6b", |
| 382 |
"data": "\uff58\uff4e--nxasmq6b", |
| 383 |
"valid": true |
| 384 |
}, |
| 385 |
{ |
| 386 |
"description": "zero width non-joiner must pass at every occurrence", |
| 387 |
"comment": "https://www.rfc-editor.org/rfc/rfc5892#appendix-A.1", |
| 388 |
"data": "\u0915\u094d\u200c\u0937x\u200cy", |
| 389 |
"valid": false |
| 390 |
}, |
| 391 |
{ |
| 392 |
"description": "Bidi domain name with a digit-first label is invalid", |
| 393 |
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2 a label in a Bidi domain name must start with an L, R or AL character", |
| 394 |
"data": "0a.\u05d0", |
| 395 |
"valid": false |
| 396 |
}, |
| 397 |
{ |
| 398 |
"description": "label starting with a digit before a right-to-left letter is invalid", |
| 399 |
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2", |
| 400 |
"data": "0\u0627", |
| 401 |
"valid": false |
| 402 |
}, |
| 403 |
{ |
| 404 |
"description": "left-to-right label containing a right-to-left letter is invalid", |
| 405 |
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2", |
| 406 |
"data": "a\u05d0", |
| 407 |
"valid": false |
| 408 |
}, |
| 409 |
{ |
| 410 |
"description": "right-to-left label mixing both digit types is invalid", |
| 411 |
"comment": "https://www.rfc-editor.org/rfc/rfc5893#section-2", |
| 412 |
"data": "\u05d00\u0660", |
| 413 |
"valid": false |
| 414 |
}, |
| 415 |
{ |
| 416 |
"description": "A-label that decodes to a disallowed code point is invalid", |
| 417 |
"comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5892#section-2.6", |
| 418 |
"data": "xn--7a", |
| 419 |
"valid": false |
| 420 |
}, |
| 421 |
{ |
| 422 |
"description": "A-label that decodes to a Bidi rule violation is invalid", |
| 423 |
"comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 https://www.rfc-editor.org/rfc/rfc5893", |
| 424 |
"data": "xn--0ca24w", |
| 425 |
"valid": false |
| 426 |
}, |
| 427 |
{ |
| 428 |
"description": "a U-label whose A-label form is longer than 63 octets is invalid", |
| 429 |
"comment": "https://www.rfc-editor.org/rfc/rfc5891#section-4.2.4 the 63-octet limit is on the A-label form, not the code point count", |
| 430 |
"data": "\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc\u00fc", |
| 431 |
"valid": false |
| 432 |
}, |
| 433 |
{ |
| 434 |
"description": "empty label between two dots is invalid", |
| 435 |
"comment": "https://www.rfc-editor.org/rfc/rfc1034#section-3.1", |
| 436 |
"data": "a..b", |
| 437 |
"valid": false |
| 438 |
}, |
| 439 |
{ |
| 440 |
"description": "a name longer than 253 characters is invalid", |
| 441 |
"data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", |
| 442 |
"valid": false |
| 443 |
}, |
| 444 |
{ |
| 445 |
"description": "A-label that decodes to only ASCII is invalid", |
| 446 |
"comment": "https://www.rfc-editor.org/rfc/rfc5890#section-2.3.2.1 a U-label must have at least one non-ASCII character", |
| 447 |
"data": "xn--example-", |
| 448 |
"valid": false |
| 449 |
}, |
| 450 |
{ |
| 451 |
"description": "non-canonical Punycode that does not re-encode to itself is invalid", |
| 452 |
"comment": "https://www.rfc-editor.org/rfc/rfc5891#section-5.4 a label decoded from Punycode must be identical to the original A-label", |
| 453 |
"data": "xn---9uc", |
| 454 |
"valid": false |
| 455 |
} |
| 456 |
] |
| 457 |
}, |
| 458 |
{ |
| 459 |
"description": "validation of separators in internationalized host names", |
| 460 |
"specification": [ |
| 461 |
{"rfc3490": "3.1", "quote": "Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61(halfwidth ideographic full stop)"} |
| 462 |
], |
| 463 |
"schema": { "format": "idn-hostname" }, |
| 464 |
"tests": [ |
| 465 |
{ |
| 466 |
"description": "single dot", |
| 467 |
"data": ".", |
| 468 |
"valid": false |
| 469 |
}, |
| 470 |
{ |
| 471 |
"description": "single ideographic full stop", |
| 472 |
"data": "\u3002", |
| 473 |
"valid": false |
| 474 |
}, |
| 475 |
{ |
| 476 |
"description": "single fullwidth full stop", |
| 477 |
"data": "\uff0e", |
| 478 |
"valid": false |
| 479 |
}, |
| 480 |
{ |
| 481 |
"description": "single halfwidth ideographic full stop", |
| 482 |
"data": "\uff61", |
| 483 |
"valid": false |
| 484 |
}, |
| 485 |
{ |
| 486 |
"description": "dot as label separator", |
| 487 |
"data": "a.b", |
| 488 |
"valid": true |
| 489 |
}, |
| 490 |
{ |
| 491 |
"description": "ideographic full stop as label separator", |
| 492 |
"data": "a\u3002b", |
| 493 |
"valid": true |
| 494 |
}, |
| 495 |
{ |
| 496 |
"description": "fullwidth full stop as label separator", |
| 497 |
"data": "a\uff0eb", |
| 498 |
"valid": true |
| 499 |
}, |
| 500 |
{ |
| 501 |
"description": "halfwidth ideographic full stop as label separator", |
| 502 |
"data": "a\uff61b", |
| 503 |
"valid": true |
| 504 |
}, |
| 505 |
{ |
| 506 |
"description": "leading dot", |
| 507 |
"data": ".example", |
| 508 |
"valid": false |
| 509 |
}, |
| 510 |
{ |
| 511 |
"description": "leading ideographic full stop", |
| 512 |
"data": "\u3002example", |
| 513 |
"valid": false |
| 514 |
}, |
| 515 |
{ |
| 516 |
"description": "leading fullwidth full stop", |
| 517 |
"data": "\uff0eexample", |
| 518 |
"valid": false |
| 519 |
}, |
| 520 |
{ |
| 521 |
"description": "leading halfwidth ideographic full stop", |
| 522 |
"data": "\uff61example", |
| 523 |
"valid": false |
| 524 |
}, |
| 525 |
{ |
| 526 |
"description": "trailing dot", |
| 527 |
"data": "example.", |
| 528 |
"valid": false |
| 529 |
}, |
| 530 |
{ |
| 531 |
"description": "trailing ideographic full stop", |
| 532 |
"data": "example\u3002", |
| 533 |
"valid": false |
| 534 |
}, |
| 535 |
{ |
| 536 |
"description": "trailing fullwidth full stop", |
| 537 |
"data": "example\uff0e", |
| 538 |
"valid": false |
| 539 |
}, |
| 540 |
{ |
| 541 |
"description": "trailing halfwidth ideographic full stop", |
| 542 |
"data": "example\uff61", |
| 543 |
"valid": false |
| 544 |
}, |
| 545 |
{ |
| 546 |
"description": "label too long if separator ignored (full stop)", |
| 547 |
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα.com", |
| 548 |
"valid": true |
| 549 |
}, |
| 550 |
{ |
| 551 |
"description": "label too long if separator ignored (ideographic full stop)", |
| 552 |
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα\u3002com", |
| 553 |
"valid": true |
| 554 |
}, |
| 555 |
{ |
| 556 |
"description": "label too long if separator ignored (fullwidth full stop)", |
| 557 |
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα\uff0ecom", |
| 558 |
"valid": true |
| 559 |
}, |
| 560 |
{ |
| 561 |
"description": "label too long if separator ignored (halfwidth ideographic full stop)", |
| 562 |
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα\uff61com", |
| 563 |
"valid": true |
| 564 |
} |
| 565 |
] |
| 566 |
} |
| 567 |
] |