Index: container/SpringSecurityValve.java =================================================================== --- container/SpringSecurityValve.java (revision 101) +++ container/SpringSecurityValve.java (working copy) @@ -133,7 +133,7 @@ Set privCred = new HashSet(); if (storeSubjectRepositoryCredentials) { - Credentials subjectRepoCreds = new SimpleCredentials(userDetails.getUsername(), userDetails.getPassword().toCharArray()); + Credentials subjectRepoCreds = new SimpleCredentials(userDetails.getUsername(), new char[0]); privCred.add(subjectRepoCreds); } Index: utils/SpringSecurityUtils.java =================================================================== --- utils/SpringSecurityUtils.java (revision 101) +++ utils/SpringSecurityUtils.java (working copy) @@ -16,21 +16,20 @@ package org.onehippo.forge.security.support.springsecurity.utils; -import javax.servlet.http.HttpServletRequest; - import com.sun.istack.internal.Nullable; - import org.apache.commons.lang.StringUtils; import org.hippoecm.hst.configuration.hosting.VirtualHosts; import org.hippoecm.hst.configuration.model.HstManager; import org.hippoecm.hst.core.container.ComponentManager; -import org.hippoecm.hst.core.container.RepositoryNotAvailableException; +import org.hippoecm.hst.core.container.ContainerException; import org.hippoecm.hst.core.request.ResolvedMount; import org.hippoecm.hst.site.HstServices; import org.hippoecm.hst.util.HstRequestUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.servlet.http.HttpServletRequest; + /** * Spring security helper class used to retrieve some information about the status of the request within Hippo. */ @@ -119,7 +118,7 @@ if (hstSitesManager != null && StringUtils.isNotEmpty(servletPath)) { return hstSitesManager.getVirtualHosts().matchMount(hostName, req.getContextPath(), servletPath); } - } catch (final RepositoryNotAvailableException e) { + } catch (final ContainerException e) { log.error("Unable to identify the resolved mount.", e); } @@ -138,8 +137,8 @@ if (hstSitesManager != null) { try { return hstSitesManager.getVirtualHosts(); - } catch (final RepositoryNotAvailableException e) { - return null; + } catch (final ContainerException e) { + log.error("Unable to fetch the virtual hosts. ", e); } }