summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/SQL.php3
-rw-r--r--lib/SQL/oracle.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/SQL.php b/lib/SQL.php
index add6fa6..102f59d 100644
--- a/lib/SQL.php
+++ b/lib/SQL.php
@@ -105,7 +105,8 @@ class SQL
protected function connect()
{
if (!$this->conn && !$this->conn_tried) {
- Log::debug("SQL: Connecting to " . $this->sql_uri);
+ $passwd_regex = '|^([a-zA-Z0-9]+://[^:]+:)[^@]+|';
+ Log::debug("SQL: Connecting to " . preg_replace($passwd_regex, '\\1***', $this->sql_uri));
$this->conn_tried = true;
diff --git a/lib/SQL/oracle.php b/lib/SQL/oracle.php
index 4bc072c..9296474 100644
--- a/lib/SQL/oracle.php
+++ b/lib/SQL/oracle.php
@@ -36,7 +36,8 @@ class SQL_oracle extends SQL
protected function connect()
{
if (!$this->conn && !$this->conn_tried) {
- Log::debug("SQL: Connecting to " . $this->sql_uri);
+ $passwd_regex = '|^([a-zA-Z0-9]+://[^:]+:)[^@]+|';
+ Log::debug("SQL: Connecting to " . preg_replace($passwd_regex, '\\1***', $this->sql_uri));
$this->conn_tried = true;