Skip to content

Commit 47c6b3b

Browse files
Fixed regular expression to get password from dsn (#12448)
1 parent 4bb7505 commit 47c6b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo_pgsql/tests/gh12423.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (!$user) {
1919
$user = $match[1] ?? '';
2020
}
2121
if (!$password) {
22-
preg_match('/password=(.*?) /', $dsnWithCredentials, $match);
22+
preg_match('/password=(.*?)$/', $dsnWithCredentials, $match);
2323
$password = $match[1] ?? '';
2424
}
2525
$dsn = str_replace(" user={$user} password={$password}", '', $dsnWithCredentials);

0 commit comments

Comments
 (0)