Author: solomax Date: Tue Feb 5 04:27:50 2013 New Revision: 1442468 URL: http://svn.apache.org/viewvc?rev=1442468&view=rev Log: Import: validation for Crypt class name is added
Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/BackupImportController.java Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/BackupImportController.java URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/BackupImportController.java?rev=1442468&r1=1442467&r2=1442468&view=diff ============================================================================== --- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/BackupImportController.java (original) +++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/BackupImportController.java Tue Feb 5 04:27:50 2013 @@ -103,6 +103,7 @@ import org.apache.openmeetings.persisten import org.apache.openmeetings.persistence.beans.user.UserContact; import org.apache.openmeetings.remote.red5.ScopeApplicationAdapter; import org.apache.openmeetings.utils.OmFileHelper; +import org.apache.openmeetings.utils.crypt.MD5Implementation; import org.apache.openmeetings.utils.math.CalendarPatterns; import org.red5.logging.Red5LoggerFactory; import org.simpleframework.xml.Serializer; @@ -590,12 +591,18 @@ public class BackupImportController exte List<Configuration> list = readList(serializer, f, "configs.xml", "configs", Configuration.class, true); for (Configuration c : list) { - Configuration cfg = configurationDao.get(c - .getConf_key()); + Configuration cfg = configurationDao.get(c.getConf_key()); c.setConfiguration_id(cfg == null ? null : cfg.getConfiguration_id()); if (c.getUser() != null && c.getUser().getUser_id() == null) { c.setUser(null); } + if ("crypt_ClassName".equals(c.getConf_key())) { + try { + Class.forName(c.getConf_value()); + } catch (ClassNotFoundException e) { + c.setConf_value(MD5Implementation.class.getCanonicalName()); + } + } configurationDao.update(c, 1L); } }