aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs23
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs27
2 files changed, 47 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index 25956d5..d1db064 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -113,7 +113,28 @@ namespace OpenSim.Data.MySQL
113 m_dataSet = new DataSet(); 113 m_dataSet = new DataSet();
114 this.persistPrimInventories = persistPrimInventories; 114 this.persistPrimInventories = persistPrimInventories;
115 115
116 m_log.Info("[REGION DB]: MySql - connecting: " + m_connectionString); 116 int passPosition = 0;
117 int passEndPosition = 0;
118 string displayConnectionString = null;
119
120 try
121 { // hide the password in the connection string
122 passPosition = m_connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase);
123 passPosition = m_connectionString.IndexOf("=", passPosition);
124 if (passPosition < m_connectionString.Length)
125 passPosition += 1;
126 passEndPosition = m_connectionString.IndexOf(";", passPosition);
127
128 displayConnectionString = m_connectionString.Substring(0, passPosition);
129 displayConnectionString += "***";
130 displayConnectionString += m_connectionString.Substring(passEndPosition, m_connectionString.Length - passEndPosition);
131 }
132 catch (Exception e )
133 {
134 m_log.Debug("Exception: password not found in connection string\n" + e.ToString());
135 }
136
137 m_log.Info("[REGION DB]: MySql - connecting: " + displayConnectionString);
117 m_connection = new MySqlConnection(m_connectionString); 138 m_connection = new MySqlConnection(m_connectionString);
118 m_connection.Open(); 139 m_connection.Open();
119 140
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index eeff31b..052c404 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -59,9 +59,32 @@ namespace OpenSim.Data.MySQL
59 59
60 public void Initialise(string connectionString) 60 public void Initialise(string connectionString)
61 { 61 {
62 m_connectionString = connectionString; 62 m_connectionString = connectionString;
63
64 int passPosition = 0;
65 int passEndPosition = 0;
66 string displayConnectionString = null;
67
68 try
69 { // hide the password in the connection string
70 passPosition = m_connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase);
71 passPosition = m_connectionString.IndexOf("=", passPosition);
72 if (passPosition < m_connectionString.Length)
73 passPosition += 1;
74 passEndPosition = m_connectionString.IndexOf(";", passPosition);
75
76 displayConnectionString = m_connectionString.Substring(0, passPosition);
77 displayConnectionString += "***";
78 displayConnectionString += m_connectionString.Substring(passEndPosition, m_connectionString.Length - passEndPosition);
79 }
80 catch (Exception e)
81 {
82 m_log.Debug("Exception: password not found in connection string\n" + e.ToString());
83 }
84
85 m_log.Info("[REGION DB]: MySql - connecting: " + displayConnectionString);
63 86
64 m_log.Info("[ESTATE DB]: MySql - connecting: "+m_connectionString); 87 //m_log.Info("[ESTATE DB]: MySql - connecting: "+m_connectionString);
65 88
66 m_connection = new MySqlConnection(m_connectionString); 89 m_connection = new MySqlConnection(m_connectionString);
67 m_connection.Open(); 90 m_connection.Open();