#30672 closed Bug (fixed)
JSONField/HStoreField key and index transforms crash.
Reported by: | Mariusz Felisiak | Owned by: | Mariusz Felisiak |
---|---|---|---|
Component: | contrib.postgres | Version: | 1.11 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
JSONField/HStoreField key and index transforms crash when we pass expressions with parameters, e.g.
KeyTransform('x', RawSQL("%s::jsonb", ['{"x": "bar"}'])
this is caused by regression introduced in the last security release 7deeabc7c7526786df6894429ce89a9c4b614086, however KeyTransform
is undocumented and such usage is untested.
Crash for nested keys in KeyTransform for JSONField
is not a regression because it has not been changed since its introduction.
Change History (12)
comment:1 by , 5 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
Description: | modified (diff) |
---|---|
Version: | 2.2 → master |
OK, it seems that it's not a regression because these transforms crashed (when we pass expressions with parameters) even before 7deeabc7c7526786df6894429ce89a9c4b614086. Of course from a different reason.
comment:5 by , 5 years ago
Description: | modified (diff) |
---|
comment:6 by , 5 years ago
Version: | master → 1.11 |
---|
comment:7 by , 5 years ago
Severity: | Normal → Release blocker |
---|
comment:8 by , 5 years ago
I moved an issue with nested transforms to a separate ticket #30704 because it is not a regression.
Well, clearly a bug. I'm inclined to view this as new usage, rather than a regression, but open to opinions.