String hpw=railoConfiguration.getAttribute("pw");
if(StringUtil.isEmpty(hpw)) {
// old password type
String pwEnc = railoConfiguration.getAttribute("password"); // encrypted password (reversable)
if (!StringUtil.isEmpty(pwEnc)) {
String pwDec = new BlowfishEasy("tpwisgh").decryptString(pwEnc);
hpw=hash(pwDec);
}
}
if(!StringUtil.isEmpty(hpw))
config.setPassword(hpw);
else if (configServer != null) {
config.setPassword(configServer.getDefaultPassword());
}
if(config instanceof ConfigServerImpl) {
ConfigServerImpl csi=(ConfigServerImpl)config;
String keyList=railoConfiguration.getAttribute("auth-keys");
if(!StringUtil.isEmpty(keyList)) {
String[] keys = ListUtil.trimItems(ListUtil.toStringArray(ListUtil.toListRemoveEmpty(keyList, ',')));
for(int i=0;i<keys.length;i++){
keys[i]=URLDecoder.decode(keys[i], "UTF-8", true);
}
csi.setAuthenticationKeys(keys);
}
}
// api key
String apiKey = railoConfiguration.getAttribute("api-key");
if(!StringUtil.isEmpty(apiKey))
config.setApiKey(apiKey);
else if(configServer != null)
config.setApiKey(configServer.getApiKey());
else
config.setApiKey(null);
// default password
if (config instanceof ConfigServerImpl) {
hpw=railoConfiguration.getAttribute("default-pw");
if(StringUtil.isEmpty(hpw)) {
// old password type
String pwEnc = railoConfiguration.getAttribute("default-password"); // encrypted password (reversable)
if (!StringUtil.isEmpty(pwEnc)) {
String pwDec = new BlowfishEasy("tpwisgh").decryptString(pwEnc);
hpw=hash(pwDec);
}
}
if(!StringUtil.isEmpty(hpw))