#3299: use postgres function convert_from() instead of encode() to insert JSON byte stream into PreparedStatement.
This works with session attributes containing special characters in the JSON blob.
This commit is contained in:
committed by
Rob Winch
parent
3b7d9f3baa
commit
d295bff7cb
@@ -23,7 +23,7 @@ public class SessionConfig implements BeanClassLoaderAware {
|
||||
|
||||
private static final String CREATE_SESSION_ATTRIBUTE_QUERY = """
|
||||
INSERT INTO %TABLE_NAME%_ATTRIBUTES (SESSION_PRIMARY_ID, ATTRIBUTE_NAME, ATTRIBUTE_BYTES)
|
||||
VALUES (?, ?, encode(?, 'escape')::jsonb)
|
||||
VALUES (?, ?, convert_from(?, 'UTF8')::jsonb)
|
||||
""";
|
||||
|
||||
private static final String UPDATE_SESSION_ATTRIBUTE_QUERY = """
|
||||
|
||||
Reference in New Issue
Block a user