forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaa223a0
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 parent95a2cca commitaa223a0
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 | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
| 71 | + | |
| 72 | + | |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
| |||
174 | 175 |
| |
175 | 176 |
| |
176 | 177 |
| |
177 |
| - | |
178 |
| - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 |
| |
180 | 185 |
| |
181 | 186 |
| |
| 187 | + | |
182 | 188 |
| |
183 | 189 |
| |
| 190 | + | |
| 191 | + | |
184 | 192 |
| |
185 | 193 |
| |
186 | 194 |
| |
| |||
199 | 207 |
| |
200 | 208 |
| |
201 | 209 |
| |
202 |
| - | |
| 210 | + | |
203 | 211 |
| |
204 |
| - | |
| 212 | + | |
205 | 213 |
| |
206 | 214 |
| |
207 | 215 |
| |
| |||
622 | 630 |
| |
623 | 631 |
| |
624 | 632 |
| |
625 |
| - | |
| 633 | + | |
626 | 634 |
| |
627 | 635 |
| |
628 | 636 |
| |
| |||
636 | 644 |
| |
637 | 645 |
| |
638 | 646 |
| |
639 |
| - | |
| 647 | + | |
640 | 648 |
| |
641 | 649 |
| |
642 | 650 |
| |
| |||
936 | 944 |
| |
937 | 945 |
| |
938 | 946 |
| |
939 |
| - | |
| 947 | + | |
940 | 948 |
| |
941 | 949 |
| |
942 | 950 |
| |
| |||
957 | 965 |
| |
958 | 966 |
| |
959 | 967 |
| |
960 |
| - | |
| 968 | + | |
961 | 969 |
| |
962 | 970 |
| |
963 |
| - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
964 | 974 |
| |
965 | 975 |
| |
966 |
| - | |
| 976 | + | |
| 977 | + | |
967 | 978 |
| |
968 | 979 |
| |
969 |
| - | |
970 |
| - | |
| 980 | + | |
971 | 981 |
| |
972 |
| - | |
973 | 982 |
| |
974 | 983 |
| |
975 | 984 |
| |
976 | 985 |
| |
977 |
| - | |
| 986 | + | |
978 | 987 |
| |
979 | 988 |
| |
980 | 989 |
| |
981 | 990 |
| |
982 |
| - | |
| 991 | + | |
983 | 992 |
| |
984 | 993 |
| |
985 | 994 |
| |
| |||
1034 | 1043 |
| |
1035 | 1044 |
| |
1036 | 1045 |
| |
1037 |
| - | |
| 1046 | + | |
1038 | 1047 |
| |
1039 | 1048 |
| |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1040 | 1052 |
| |
1041 | 1053 |
| |
1042 |
| - | |
| 1054 | + | |
1043 | 1055 |
| |
1044 | 1056 |
| |
1045 | 1057 |
| |
1046 | 1058 |
| |
| 1059 | + | |
1047 | 1060 |
| |
1048 |
| - | |
| 1061 | + | |
| 1062 | + | |
1049 | 1063 |
| |
1050 | 1064 |
| |
1051 | 1065 |
| |
|
0 commit comments
Comments
(0)