mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
dbeaver/pro#8281 check inner database password (#4155)
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
+4
-1
@@ -184,7 +184,10 @@ public class CBDatabase extends InternalDB<WebDatabaseConfig> {
|
||||
return getDatabaseDriver(dataSourceProviderRegistry);
|
||||
}
|
||||
|
||||
private void setDefaultUserAndPassword(@NotNull DBPDriver driver) {
|
||||
private void setDefaultUserAndPassword(@NotNull DBPDriver driver) throws DBException {
|
||||
if (!driver.isEmbedded() && CommonUtils.isEmpty(databaseConfig.getPassword())) {
|
||||
throw new DBException("Password must be specified for non-embedded database");
|
||||
}
|
||||
if (!CommonUtils.isEmpty(databaseConfig.getUser()) || !driver.isEmbedded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user