Commit 79e1c1c
authored
fix(app-scripts): raise TLD character limit in allowNetworks validation from 6 to 63 (#2972)
The regex used in `isValidNetwork` capped TLD length at 6 characters
({2,6}), which incorrectly rejected valid domains whose TLD is longer
than 6 characters (e.g. .hosting, .international, .construction).
The upper bound is raised to 63, which is the maximum length of a single
DNS label as defined by RFC 1035 §2.3.4. This is not arbitrary — it is
the hard protocol-level ceiling that ICANN itself enforces when approving
new TLDs. Since ICANN opened the generic TLD (gTLD) programme in 2012,
hundreds of long TLDs have been delegated, making the previous limit of 6
both technically incorrect and a source of real customer friction.
Fixes: customer was unable to upload a custom app using the allowNetworks
entry `qa-gql-gateway.akzonobel.hosting` because `.hosting` (7 chars)
exceeded the old limit.
The outbound worker (functions-api-outbound-worker) is not affected — it
uses the `tldts` library backed by the Public Suffix List, which has no
character-length restriction and already handles long TLDs correctly.
Made-with: Cursor1 parent b783c2c commit 79e1c1c
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
73 | 98 | | |
74 | 99 | | |
75 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments