Opened 5 years ago

Last modified 5 years ago

#30672 closed Bug

JSONField/HStoreField key and index transforms crash. — at Version 2

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 Mariusz Felisiak)

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 (2)

comment:1 by Carlton Gibson, 5 years ago

Triage Stage: UnreviewedAccepted

Well, clearly a bug. I'm inclined to view this as new usage, rather than a regression, but open to opinions.

comment:2 by Mariusz Felisiak, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top