mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Incorrect Read only connection string on development self-hosted environment (#5426)
This commit is contained in:
@ -241,7 +241,18 @@ public class GlobalSettings : IGlobalSettings
|
||||
public string ConnectionString
|
||||
{
|
||||
get => _connectionString;
|
||||
set => _connectionString = value.Trim('"');
|
||||
set
|
||||
{
|
||||
// On development environment, the self-hosted overrides would not override the read-only connection string, since it is already set from the non-self-hosted connection string.
|
||||
// This causes a bug, where the read-only connection string is pointing to self-hosted database.
|
||||
if (!string.IsNullOrWhiteSpace(_readOnlyConnectionString) &&
|
||||
_readOnlyConnectionString == _connectionString)
|
||||
{
|
||||
_readOnlyConnectionString = null;
|
||||
}
|
||||
|
||||
_connectionString = value.Trim('"');
|
||||
}
|
||||
}
|
||||
|
||||
public string ReadOnlyConnectionString
|
||||
|
Reference in New Issue
Block a user