Don't reflect a malformed DSN in error messages. It's not necessary, and carries a distant risk of XSS in the host app.

This commit is contained in:
Marcus Bointon 2023-08-29 09:44:47 +02:00
parent fa59bf6cb1
commit 397a4d4a44
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
1 changed files with 1 additions and 3 deletions

View File

@ -80,9 +80,7 @@ class DSNConfigurator
$config = $this->parseUrl($dsn);
if (false === $config || !isset($config['scheme']) || !isset($config['host'])) {
throw new Exception(
sprintf('Malformed DSN: "%s".', $dsn)
);
throw new Exception('Malformed DSN');
}
if (isset($config['query'])) {