Commit b74adc5
committed
fix(providers): accept CIDR subnets and surface host validation errors
The additional-host regex in provider-base-modify.js used \d inside a
single-backslash string literal, so JS compiled it as the bare letter d.
CIDR masks like /21 silently failed validation. On rejection the input
only shake-animated with no explanation, leaving users guessing.
- Escape \d/\/ properly so the CIDR group matches /0../32
- Drop g/m regex flags (irrelevant for ^...$ single-line tests)
- Replace silent shake with a Fomantic pointing red label under the
input, auto-hidden after 5s, role="alert" for a11y
- Switch .html(value) to .text(value) for host rows (defense in depth
even though the regex already excludes < and >)
- Add pr_InvalidHostAddress translation across 26 languages1 parent 3603720 commit b74adc5
30 files changed
Lines changed: 111 additions & 16 deletions
File tree
- sites/admin-cabinet/assets/js
- pbx/Providers
- src/Providers
- src/Common/Messages
- az
- cs
- da
- de
- el
- en
- es
- fi
- fr
- hr
- hu
- it
- ja
- ka
- nl
- pl
- pt_BR
- pt
- ro
- ru
- sv
- th
- tr
- uk
- vi
- zh_Hans
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
Lines changed: 40 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
897 | 930 | | |
898 | 931 | | |
899 | 932 | | |
| |||
905 | 938 | | |
906 | 939 | | |
907 | 940 | | |
908 | | - | |
| 941 | + | |
909 | 942 | | |
910 | 943 | | |
911 | | - | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
912 | 948 | | |
913 | 949 | | |
914 | 950 | | |
| |||
918 | 954 | | |
919 | 955 | | |
920 | 956 | | |
921 | | - | |
| 957 | + | |
922 | 958 | | |
923 | 959 | | |
924 | 960 | | |
| |||
970 | 1006 | | |
971 | 1007 | | |
972 | 1008 | | |
973 | | - | |
| 1009 | + | |
974 | 1010 | | |
975 | 1011 | | |
976 | 1012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
0 commit comments