Evan Jones
8ceef73b84
pgtype.parseHstore: Reject invalid input; Fix error messages
...
The parseHstore function did not check the return value from
p.Consume() after a ', ' sequence. It expects a doublequote '"' that
starts the next key, but would accept any character. This means it
accepted invalid input such as:
"key1"=>"b", ,key2"=>"value"
Add a unit test that covers this case
Fix a couple of the nearby error strings while looking at this.
Found by looking at staticcheck warnings:
pgtype/hstore.go:434:6: this value of end is never used (SA4006)
pgtype/hstore.go:434:6: this value of r is never used (SA4006)
2023-05-15 18:10:20 -05:00
..
2022-04-09 09:12:55 -05:00
2023-02-10 20:21:25 -06:00
2023-02-10 20:21:25 -06:00
2022-04-16 14:21:40 -05:00
2022-04-26 14:52:01 -05:00
2022-04-09 09:12:55 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2023-04-27 20:29:41 -05:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2022-12-20 20:12:12 -06:00
2022-12-21 17:54:42 -06:00
2022-12-21 17:54:42 -06:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2023-04-20 20:13:37 -05:00
2022-04-09 09:12:55 -05:00
2023-03-11 15:34:08 -06:00
2022-11-12 07:01:11 -06:00
2022-11-12 07:06:54 -06:00
2022-12-23 13:14:56 -06:00
2022-04-09 09:12:55 -05:00
2022-08-22 21:01:18 -05:00
2022-07-23 10:52:35 -05:00
2022-07-23 10:11:13 -05:00
2022-07-23 10:11:13 -05:00
2022-04-09 09:09:46 -05:00
2022-08-22 21:01:18 -05:00
2022-04-09 09:09:46 -05:00
2022-09-24 10:00:40 -05:00
2023-05-15 18:10:20 -05:00
2023-05-15 18:10:20 -05:00
2022-07-10 14:31:55 -05:00
2022-07-11 08:07:23 -05:00
2022-04-09 09:09:46 -05:00
2022-04-09 09:09:46 -05:00
2022-12-17 09:10:02 -06:00
2022-12-17 09:10:02 -06:00
2021-12-04 13:07:54 -06:00
2023-02-10 20:26:18 -06:00
2022-07-09 16:47:28 -05:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2023-03-25 10:22:11 -05:00
2023-03-25 10:22:11 -05:00
2023-03-25 10:22:11 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2022-09-24 10:30:12 -05:00
2022-04-09 09:12:55 -05:00
2022-04-09 09:12:55 -05:00
2022-04-23 16:55:24 -05:00
2022-04-23 12:50:18 -05:00
2023-01-30 21:33:02 -06:00
2023-01-30 21:33:02 -06:00
2022-04-09 09:12:55 -05:00
2022-04-09 09:12:55 -05:00
2023-04-27 20:29:41 -05:00
2023-04-11 18:07:05 -05:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2022-04-09 09:12:55 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2022-08-22 21:01:18 -05:00
2022-04-16 10:39:12 -05:00
2022-08-22 21:01:18 -05:00
2022-04-23 11:10:04 -05:00
2022-04-23 11:10:04 -05:00
2022-04-09 09:12:55 -05:00
2022-04-09 09:12:55 -05:00
2022-08-13 08:09:44 -05:00
2022-08-13 08:09:44 -05:00
2022-01-08 16:24:05 -06:00
2022-05-12 17:13:49 -05:00
2022-08-22 21:01:18 -05:00
2022-04-02 14:34:19 -05:00
2023-01-24 07:55:00 -06:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2022-04-09 09:12:55 -05:00
2022-04-02 14:34:19 -05:00
2022-08-22 21:01:18 -05:00
2022-04-26 08:37:10 -05:00
2022-04-26 08:37:10 -05:00