Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0003267: Log better error message when SymmetricDS fails to decrypt a
db.password
  • Loading branch information
chenson42 committed Oct 3, 2017
1 parent 106de93 commit 6cfd2ff
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -81,8 +81,12 @@ public static ResettableBasicDataSource create(TypedProperties properties,

String password = properties.get(BasicDataSourcePropertyConstants.DB_POOL_PASSWORD, "");
if (password != null && password.startsWith(SecurityConstants.PREFIX_ENC)) {
password = securityService.decrypt(password.substring(SecurityConstants.PREFIX_ENC
try {
password = securityService.decrypt(password.substring(SecurityConstants.PREFIX_ENC
.length()));
} catch (Exception ex) {
throw new IllegalStateException("Failed to decrypt the datbaase password from your engine properties file stored under the " + BasicDataSourcePropertyConstants.DB_POOL_PASSWORD + " property. Please re-encrypt your password", ex);
}
}
dataSource.setPassword(password);
dataSource.setInitialSize(properties.getInt(
Expand Down

0 comments on commit 6cfd2ff

Please sign in to comment.