Skip to content

Commit 0b3426c

Browse files
committed
Extract text from jsonb string value in a correct and safe way
1 parent 6289d65 commit 0b3426c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FUNCTIONS/cbor_next_map.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ WITH RECURSIVE x AS (
1515
SELECT
1616
map_value.remainder,
1717
x.item_count-1,
18-
x.map || jsonb_build_object(trim('"' FROM map_key.item::text), map_value.item)
18+
x.map || jsonb_build_object(map_key.item#>>'{}', map_value.item)
1919
FROM x
2020
JOIN LATERAL webauthn.cbor_next_item(x.remainder) AS map_key ON TRUE
2121
JOIN LATERAL webauthn.cbor_next_item(map_key.remainder) AS map_value ON TRUE

0 commit comments

Comments
 (0)