Closed Machado117 closed 1 year ago
Hello, nice catch. I reproduced this error and we will fix it soon. AcraServer supports columns wrapped in double quotes but in this case, sqlparser incorrectly matched this as string literal instead of column name for PostgreSQL dialect. Due to pgsql doesn't allow strings in double quotes, it was handled as error.
2022/10/03 16:49:32 ignoring error parsing DDL 'CREATE TABLE mytable ("NAME" bytea, "AGE" integer);': syntax error at position 29 near 'NAME' 2022/10/03 16:49:32 ignoring error parsing DDL 'CREATE TABLE mytable ("NAME" bytea, "AGE" integer);': syntax error at position 29 near 'NAME'
These log messages are valid and don't affect any encryption operations, because acra-server doesn't need to process DDL for now. But there is an error in another place.
Hi. Recently we have pushed new updates (#590) which fixes this issue. Please, pull and try acra from the master branch.
Great! It's fixed, thanks!
Describe the bug Errors can be found on acra server logs when creating tables with columns wrapped with double quotes. Also, when executing select queries that use columns wrapped with double quotes, encrypted fields won't be decrypted.
To Reproduce Steps to reproduce the behavior:
CREATE TABLE mytable ("NAME" bytea, "AGE" integer);
Acra logs:
INSERT INTO mytable ("NAME", "AGE") VALUES ('John', 1);
SELECT * FROM mytable WHERE "AGE" = 1;
Acra logs:------------+----- \x4a6f686e | 1 (1 row)
Environment (please complete the following information):