Fix OpenSim bombing when a MySQL connection string doesn't contain a password.

Passwordless connection is perfectly legal and makes sense within a
container.
melanie
Melanie Thielker 2016-12-10 18:36:10 +00:00
parent f57403909f
commit 5ad8bceb1d
1 changed files with 2 additions and 0 deletions

View File

@ -1685,6 +1685,8 @@ namespace OpenSim.Framework
// hide the password in the connection string
passPosition = connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase);
if (passPosition == -1)
return connectionString;
passPosition = connectionString.IndexOf("=", passPosition);
if (passPosition < connectionString.Length)
passPosition += 1;