forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite6ecc93
committed
Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage.
Commite09996f was one brick shy of a load: it didn't insistthat the detected JSON number be the whole of the supplied string.This allowed inputs such as "2016-01-01" to be misdetected as valid JSONnumbers. Per bug #13906 from Dmitry Ryabov.In passing, be more wary of zero-length input (I'm not sure this canhappen given current callers, but better safe than sorry), and do someminor cosmetic cleanup.1 parent7d17e68 commite6ecc93
File tree
3 files changed
+43
-29
lines changed- contrib/hstore
- expected
- sql
- src/backend/utils/adt
3 files changed
+43
-29
lines changedLines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1466 | 1466 |
| |
1467 | 1467 |
| |
1468 | 1468 |
| |
1469 |
| - | |
1470 |
| - | |
1471 |
| - | |
1472 |
| - | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1473 | 1473 |
| |
1474 | 1474 |
| |
1475 | 1475 |
| |
| |||
1484 | 1484 |
| |
1485 | 1485 |
| |
1486 | 1486 |
| |
1487 |
| - | |
1488 |
| - | |
1489 |
| - | |
1490 |
| - | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
1491 | 1491 |
| |
1492 | 1492 |
| |
1493 | 1493 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
334 | 334 |
| |
335 | 335 |
| |
336 | 336 |
| |
337 |
| - | |
| 337 | + | |
338 | 338 |
| |
339 | 339 |
| |
340 | 340 |
| |
341 |
| - | |
| 341 | + | |
342 | 342 |
| |
343 | 343 |
| |
344 | 344 |
| |
|
Lines changed: 33 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 |
| - | |
| 79 | + | |
| 80 | + | |
80 | 81 |
| |
81 | 82 |
| |
82 | 83 |
| |
| |||
182 | 183 |
| |
183 | 184 |
| |
184 | 185 |
| |
185 |
| - | |
186 |
| - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 |
| |
188 | 193 |
| |
189 | 194 |
| |
| 195 | + | |
190 | 196 |
| |
191 | 197 |
| |
| 198 | + | |
| 199 | + | |
192 | 200 |
| |
193 | 201 |
| |
194 | 202 |
| |
| |||
207 | 215 |
| |
208 | 216 |
| |
209 | 217 |
| |
210 |
| - | |
| 218 | + | |
211 | 219 |
| |
212 |
| - | |
| 220 | + | |
213 | 221 |
| |
214 | 222 |
| |
215 | 223 |
| |
| |||
669 | 677 |
| |
670 | 678 |
| |
671 | 679 |
| |
672 |
| - | |
| 680 | + | |
673 | 681 |
| |
674 | 682 |
| |
675 | 683 |
| |
| |||
683 | 691 |
| |
684 | 692 |
| |
685 | 693 |
| |
686 |
| - | |
| 694 | + | |
687 | 695 |
| |
688 | 696 |
| |
689 | 697 |
| |
| |||
983 | 991 |
| |
984 | 992 |
| |
985 | 993 |
| |
986 |
| - | |
| 994 | + | |
987 | 995 |
| |
988 | 996 |
| |
989 | 997 |
| |
| |||
1004 | 1012 |
| |
1005 | 1013 |
| |
1006 | 1014 |
| |
1007 |
| - | |
| 1015 | + | |
1008 | 1016 |
| |
1009 | 1017 |
| |
1010 |
| - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1011 | 1021 |
| |
1012 | 1022 |
| |
1013 |
| - | |
| 1023 | + | |
| 1024 | + | |
1014 | 1025 |
| |
1015 | 1026 |
| |
1016 |
| - | |
1017 |
| - | |
| 1027 | + | |
1018 | 1028 |
| |
1019 |
| - | |
1020 | 1029 |
| |
1021 | 1030 |
| |
1022 | 1031 |
| |
1023 | 1032 |
| |
1024 |
| - | |
| 1033 | + | |
1025 | 1034 |
| |
1026 | 1035 |
| |
1027 | 1036 |
| |
1028 | 1037 |
| |
1029 |
| - | |
| 1038 | + | |
1030 | 1039 |
| |
1031 | 1040 |
| |
1032 | 1041 |
| |
| |||
1081 | 1090 |
| |
1082 | 1091 |
| |
1083 | 1092 |
| |
1084 |
| - | |
| 1093 | + | |
1085 | 1094 |
| |
1086 | 1095 |
| |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1087 | 1099 |
| |
1088 | 1100 |
| |
1089 |
| - | |
| 1101 | + | |
1090 | 1102 |
| |
1091 | 1103 |
| |
1092 | 1104 |
| |
1093 | 1105 |
| |
| 1106 | + | |
1094 | 1107 |
| |
1095 |
| - | |
| 1108 | + | |
| 1109 | + | |
1096 | 1110 |
| |
1097 | 1111 |
| |
1098 | 1112 |
| |
|
0 commit comments
Comments
(0)