gty404 commented on code in PR #1067:
URL: https://github.com/apache/iceberg-cpp/pull/1067#discussion_r4434122576
##########
src/iceberg/catalog/sql/catalog_store_postgresql.cc:
##########
@@ -83,7 +83,8 @@ Result<std::shared_ptr<CatalogStore>>
MakePostgreSqlCatalogStore(
return std::make_shared<PostgresqlSingleCatalogStore>(options.catalog_name,
std::move(connection));
} catch (const std::exception& e) {
- return IOError("Failed to connect to PostgreSQL '{}': {}", options.uri,
e.what());
+ return IOError("Failed to connect to PostgreSQL '{}': {}",
+ RedactConnectionUri(options.uri), e.what());
Review Comment:
Fixed in 90f9f404. PostgreSQL and MySQL connection failures no longer append
driver-provided `e.what()`, which can contain password fragments from libpq
conninfo parsing. Added a PostgreSQL factory-level regression test with `secret
fragment`; it asserts neither the password nor the leaked fragment appears in
the returned error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]