mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fixed regular expression to get password from dsn (#12448)
This commit is contained in:
@@ -19,7 +19,7 @@ if (!$user) {
|
||||
$user = $match[1] ?? '';
|
||||
}
|
||||
if (!$password) {
|
||||
preg_match('/password=(.*?) /', $dsnWithCredentials, $match);
|
||||
preg_match('/password=(.*?)$/', $dsnWithCredentials, $match);
|
||||
$password = $match[1] ?? '';
|
||||
}
|
||||
$dsn = str_replace(" user={$user} password={$password}", '', $dsnWithCredentials);
|
||||
|
||||
Reference in New Issue
Block a user