Skip to content

Commit

Permalink
Merge branch 'ttp-prod' of https://github.com/siteadmin/ett
Browse files Browse the repository at this point in the history
  • Loading branch information
ssavarala committed Apr 30, 2018
2 parents 0a71139 + 797eedd commit 9ef052e
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class SmtpEdgeLogFacade extends DatabaseFacade {
* @param config
* @throws DatabaseException
*/

public SmtpEdgeLogFacade(Configuration config) throws DatabaseException {
super(config);
}
Expand Down Expand Up @@ -157,9 +157,11 @@ public String saveSmtpProfile(SmtpEdgeProfileInterface profile) throws DatabaseE
sql.append(SMTPEDGEPROFILE_SUTSMTPADDRESS + " = '" + profile.getSutSMTPAddress() + "', ");
sql.append(SMTPEDGEPROFILE_SUTEMAILADDRESS + " = '" + profile.getSutEmailAddress() + "', ");
sql.append(SMTPEDGEPROFILE_SUTUSERNAME + " = '" + profile.getSutUsername() + "', ");
sql.append(SMTPEDGEPROFILE_SUTPASSWORD + " = AES_ENCRYPT('" + profile.getSutPassword() + "','"+SMTPEDGEPROFILE_ENCRYPTKEY+"' ) ,");
sql.append(SMTPEDGEPROFILE_SUTPASSWORD + " = AES_ENCRYPT('" + profile.getSutPassword() + "',UNHEX('"+SMTPEDGEPROFILE_ENCRYPTKEY+"') ) ,");
sql.append(SMTPEDGEPROFILE_USETLS + " = "+ profile.getUseTLS() +" ");
sql.append("WHERE " + SMTPEDGEPROFILE_SMTPEDGEPROFILEID + " = '" + existingProfileID + "';");
//System.out.println("profile.getSutUsername() ..."+profile.getSutUsername());
//System.out.println("update sql ..."+sql.toString());
try {
this.getConnection().executeUpdate(sql.toString());
} catch (SQLException ex) {
Expand Down Expand Up @@ -554,9 +556,9 @@ private void changeSutDataType() throws DatabaseException {
} catch (Exception e) {
e.printStackTrace();
throw new DatabaseException(e.getMessage());
}
}
}

private static String getPasswdEncryKey(){
String passwdEncryKey = "F3429A0B371ED20C3";
try{
Expand All @@ -572,7 +574,7 @@ private static String getPasswdEncryKey(){
e.printStackTrace();
}
return passwdEncryKey;
}
}
/**
*
* @param args
Expand Down

0 comments on commit 9ef052e

Please sign in to comment.