You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle escaped quotes in fill_hidden_credentials credential extraction
`fill_hidden_credentials` used `find('\'')` to locate the closing quote
of a credential value, which stops prematurely on backslash-escaped quotes
(`\'`) that `escape_clickhouse_string` emits for passwords containing
single quotes. Replace with `find_closing_quote`, which skips `\'` pairs,
so the full credential value is extracted correctly. Add a test to cover
this case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
// A password containing a single quote is backslash-escaped in the desired DDL
2470
+
// (`pass\'word`). fill_hidden_credentials must not stop at the escaped quote.
2471
+
let actual = "CREATE DICTIONARY `db`.`d` (\n `id` UInt64\n)\nPRIMARY KEY `id`\nSOURCE(MYSQL(HOST 'localhost' PORT 3306 USER 'user' PASSWORD '[HIDDEN]' TABLE 'src' DB 'mydb'))\nLAYOUT(HASHED())\nLIFETIME(MIN 0 MAX 300)";
2472
+
let desired = "CREATE DICTIONARY IF NOT EXISTS `db`.`d` (\n `id` UInt64\n)\nPRIMARY KEY `id`\nSOURCE(MYSQL(HOST 'localhost' PORT 3306 USER 'user' PASSWORD 'pass\\'word' TABLE 'src' DB 'mydb'))\nLAYOUT(HASHED())\nLIFETIME(MIN 0 MAX 300)";
0 commit comments