Opened 5 years ago

Last modified 5 years ago

#30672 closed Bug

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

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

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)

comment:3 by Mariusz Felisiak, 5 years ago

Description: modified (diff)
Version: 2.2master

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.

Note: See TracTickets for help on using tickets.
Back to Top