Commit 99c9cb0
committed
fix: tighten parse-time validation and document matching limits
Four small corrections:
Varname grammar: the RFC grammar requires dots only between varchar
groups, so {foo..bar} and {foo.} are now rejected. Previously the
regex allowed any dot placement after the first char.
Adjacent explodes: previously only same-operator adjacent explodes
({/a*}{/b*}) were rejected. Different operators ({/a*}{.b*}) are
equally ambiguous because the first operator's character class
typically includes the second's separator, so the first explode
greedily consumes both. All adjacent explodes are now rejected; a
literal or non-explode variable between them still disambiguates.
Documented the inherent ambiguity of multi-var reserved expressions
({+x,y} with commas in values) and the intentional tradeoff that
{+var} match stops at ? and # so {+path}{?q} can separate correctly.1 parent 93e742b commit 99c9cb0
File tree
2 files changed
+70
-23
lines changed2 files changed
+70
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
11 | 31 | | |
12 | 32 | | |
13 | 33 | | |
| |||
25 | 45 | | |
26 | 46 | | |
27 | 47 | | |
| 48 | + | |
28 | 49 | | |
29 | | - | |
| 50 | + | |
30 | 51 | | |
31 | 52 | | |
32 | 53 | | |
| |||
717 | 738 | | |
718 | 739 | | |
719 | 740 | | |
720 | | - | |
| 741 | + | |
721 | 742 | | |
722 | 743 | | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
727 | 751 | | |
728 | 752 | | |
729 | | - | |
730 | | - | |
731 | | - | |
| 753 | + | |
| 754 | + | |
732 | 755 | | |
733 | | - | |
| 756 | + | |
734 | 757 | | |
735 | 758 | | |
736 | 759 | | |
737 | | - | |
| 760 | + | |
738 | 761 | | |
739 | 762 | | |
740 | 763 | | |
741 | | - | |
| 764 | + | |
742 | 765 | | |
743 | | - | |
| 766 | + | |
744 | 767 | | |
745 | 768 | | |
746 | | - | |
| 769 | + | |
747 | 770 | | |
748 | 771 | | |
749 | | - | |
| 772 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
121 | 137 | | |
122 | 138 | | |
123 | 139 | | |
| |||
134 | 150 | | |
135 | 151 | | |
136 | 152 | | |
137 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
138 | 162 | | |
139 | | - | |
| 163 | + | |
140 | 164 | | |
141 | 165 | | |
142 | 166 | | |
| |||
201 | 225 | | |
202 | 226 | | |
203 | 227 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 228 | | |
210 | 229 | | |
211 | 230 | | |
212 | 231 | | |
213 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
214 | 238 | | |
215 | 239 | | |
216 | 240 | | |
| |||
0 commit comments