Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(database): percent-encode spaces in Postgres connection URI (#9685)

Sayak Bhattacharyadbc113fe81c1
diff --git a/crates/common_utils/src/lib.rs b/crates/common_utils/src/lib.rs
index 56e0791fdd..51630fd6a1 100644
--- a/crates/common_utils/src/lib.rs
+++ b/crates/common_utils/src/lib.rs
@@ -309,7 +309,7 @@ pub trait DbConnectionParams {
fn get_dbname(&self) -> &str;
fn get_database_url(&self, schema: &str) -> String {
format!(
- "postgres://{}:{}@{}:{}/{}?application_name={}&options=-c search_path%3D{}",
+ "postgres://{}:{}@{}:{}/{}?application_name={}&options=-c%20search_path%3D{}",
self.get_username(),
self.get_password().peek(),
self.get_host(),