We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd7c266 commit b68c4d5Copy full SHA for b68c4d5
src/PostgresConfig.php
@@ -153,17 +153,17 @@ public function getConnectionString(): string
153
154
$user = $this->getUser();
155
if ($user !== null) {
156
- $chunks[] = "user=" . $user;
+ $chunks[] = \sprintf("user='%s'", \addslashes($user));
157
}
158
159
$password = $this->getPassword();
160
if ($password !== null) {
161
- $chunks[] = "password=" . $password;
+ $chunks[] = \sprintf("password='%s'", \addslashes($password));
162
163
164
$database = $this->getDatabase();
165
if ($database !== null) {
166
- $chunks[] = "dbname=" . $database;
+ $chunks[] = \sprintf("dbname='%s'", \addslashes($database));
167
168
169
if ($this->sslMode !== null) {
0 commit comments