Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
33563085
Commit
33563085
authored
Jan 06, 2015
by
Robin Appelman
Browse files
Prevent leaking db connection info in the stacktrace
parent
622c4cf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/private/db/connection.php
View file @
33563085
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
*/
*/
namespace
OC\DB
;
namespace
OC\DB
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Configuration
;
use
Doctrine\DBAL\Configuration
;
use
Doctrine\DBAL\Cache\QueryCacheProfile
;
use
Doctrine\DBAL\Cache\QueryCacheProfile
;
...
@@ -24,6 +25,15 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
...
@@ -24,6 +25,15 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
*/
*/
protected
$adapter
;
protected
$adapter
;
public
function
connect
()
{
try
{
return
parent
::
connect
();
}
catch
(
DBALException
$e
)
{
// throw a new exception to prevent leaking info from the stacktrace
throw
new
DBALException
(
$e
->
getMessage
(),
$e
->
getCode
());
}
}
/**
/**
* Initializes a new instance of the Connection class.
* Initializes a new instance of the Connection class.
*
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment