=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java 2015-10-16 09:49:16 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java 2015-10-16 12:50:37 +0000 @@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang.StringUtils; import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.configuration.Configuration; @@ -299,7 +300,7 @@ { Configuration config = configurationService.getConfiguration(); - config.setSmtpPassword( password ); + config.setSmtpPassword( StringUtils.trimToNull( password ) ); configurationService.setConfiguration( config ); } @@ -317,7 +318,7 @@ { Configuration config = configurationService.getConfiguration(); - config.setRemoteServerUrl( url ); + config.setRemoteServerUrl( StringUtils.trimToNull( url ) ); configurationService.setConfiguration( config ); } @@ -335,7 +336,7 @@ { Configuration config = configurationService.getConfiguration(); - config.setRemoteServerUsername( username ); + config.setRemoteServerUsername( StringUtils.trimToNull( username ) ); configurationService.setConfiguration( config ); } @@ -347,7 +348,7 @@ { Configuration config = configurationService.getConfiguration(); - config.setRemoteServerPassword( password ); + config.setRemoteServerPassword( StringUtils.trimToNull( password ) ); configurationService.setConfiguration( config ); }