Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6915

Invalid principalName should not throw InvalidQueryException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.4, 5.5
    • Fix Version/s: 5.4.11, 5.5.1
    • Component/s: core
    • Labels:
      None
    • Sprint:
      Kromeriz 78
    • Story Points:
      1
    • Magnolia Release:
      5.4.11, 5.5.1

      Description

      Using some of the illegal characters of JCR (like e.g. "/" in this example) in the names of LDAP groups causes following error.

      ERROR  info.magnolia.cms.security.JCRSessionOp 05.12.2016 15:49:00 -- Failed to execute get group DTS Commission Agreements - R/W Access session operation with Illegal name: DTS Commission Agreements - R/W Access
      javax.jcr.query.InvalidQueryException: Illegal name: DTS Commission Agreements - R/W Access
              at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.getNodeNameQuery(LuceneQueryFactory.java:666)
              at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.getComparisonQuery(LuceneQueryFactory.java:625)
              at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.mapConstraintToQueryAndFilter(LuceneQueryFactory.java:400)
              at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.execute(LuceneQueryFactory.java:210)
              at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:465)
              at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:126)
              at org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:115)
              at org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObjectModelImpl.java:129)
              at org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObjectModelImpl.java:124)
              at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
              at org.apache.jackrabbit.core.query.QueryObjectModelImpl.execute(QueryObjectModelImpl.java:123)
              at info.magnolia.cms.security.RepositoryBackedSecurityManager.findPrincipalNodeByQuery(RepositoryBackedSecurityManager.java:304)
              at info.magnolia.cms.security.RepositoryBackedSecurityManager.findPrincipalNode(RepositoryBackedSecurityManager.java:277)
              at info.magnolia.cms.security.RepositoryBackedSecurityManager.findPrincipalNode(RepositoryBackedSecurityManager.java:265)
              at info.magnolia.cms.security.MgnlGroupManager.findPrincipalNode(MgnlGroupManager.java:181)
              at info.magnolia.cms.security.MgnlGroupManager$2.doExec(MgnlGroupManager.java:105)
              at info.magnolia.cms.security.MgnlGroupManager$2.doExec(MgnlGroupManager.java:101)
              at info.magnolia.cms.security.SilentSessionOp.exec(SilentSessionOp.java:70)
              at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:392)
              at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:377)
              at info.magnolia.cms.security.MgnlGroupManager.getGroup(MgnlGroupManager.java:101)
              at info.magnolia.jaas.sp.ldap.LDAPUserManager.collectRoleNames(LDAPUserManager.java:340)
              at info.magnolia.jaas.sp.ldap.LDAPUserManager.populateGroupAndRoleListsByGroupResolver(LDAPUserManager.java:301)
              at info.magnolia.jaas.sp.ldap.LDAPUserManager.getUser(LDAPUserManager.java:202)
              at info.magnolia.jaas.sp.ldap.LDAPUserManager.getAllUsers(LDAPUserManager.java:128)
              at info.magnolia.cms.security.ExternalUserManager.getUsersWithGroup(ExternalUserManager.java:218)
              at info.magnolia.cms.security.ExternalUserManager.getUsersWithGroup(ExternalUserManager.java:204)
              at info.magnolia.cms.security.DelegatingUserManager$24.delegate(DelegatingUserManager.java:364)
              at info.magnolia.cms.security.DelegatingUserManager$24.delegate(DelegatingUserManager.java:361)
              at info.magnolia.cms.security.DelegatingUserManager.delegateAndCollectSilently(DelegatingUserManager.java:202)
              at info.magnolia.cms.security.DelegatingUserManager.getUsersWithGroup(DelegatingUserManager.java:361)
              at info.magnolia.ui.framework.task.LocalTaskDispatcherManager.getAllRecipients(LocalTaskDispatcherManager.java:139)
              at info.magnolia.ui.framework.task.LocalTaskDispatcherManager.taskResolved(LocalTaskDispatcherManager.java:93)
              at info.magnolia.task.event.TaskEvent.dispatch(TaskEvent.java:60)
              at info.magnolia.task.event.TaskEvent.dispatch(TaskEvent.java:42)
              at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:78)
              at info.magnolia.task.DefaultTasksManager.resolve(DefaultTasksManager.java:86)
              at info.magnolia.ui.admincentral.shellapp.pulse.task.action.ResolveTaskAction.executeTask(ResolveTaskAction.java:61)
              at info.magnolia.ui.admincentral.shellapp.pulse.task.action.AbortTaskAction.executeTask(AbortTaskAction.java:64)
              at info.magnolia.ui.admincentral.shellapp.pulse.task.action.AbstractTaskAction.execute(AbstractTaskAction.java:76)
              at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62)
              at info.magnolia.ui.admincentral.shellapp.pulse.item.detail.AbstractPulseDetailPresenter.onActionbarItemClicked(AbstractPulseDetailPresenter.java:155)
              at info.magnolia.ui.actionbar.ActionbarPresenter.onActionbarItemClicked(ActionbarPresenter.java:205)
              at info.magnolia.ui.actionbar.ActionbarViewImpl$1.actionTrigger(ActionbarViewImpl.java:67)
              at sun.reflect.GeneratedMethodAccessor882.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508)
              at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:198)
              at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161)
              at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:977)
              at info.magnolia.ui.vaadin.actionbar.Actionbar.access$000(Actionbar.java:59)
              at info.magnolia.ui.vaadin.actionbar.Actionbar$1.onActionTriggered(Actionbar.java:72)
              at sun.reflect.GeneratedMethodAccessor881.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
      		  at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
              at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:291)
              at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:184)
              at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:92)
              at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
              at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
              at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
              at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.service(AdmincentralVaadinServlet.java:131)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:148)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.VirtualUriFilter.doFilter(VirtualUriFilter.java:69)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.module.cache.executor.Bypass.processCacheRequest(Bypass.java:58)
              at info.magnolia.module.cache.executor.CompositeExecutor.processCacheRequest(CompositeExecutor.java:67)
              at info.magnolia.module.cache.filter.CacheFilter.doFilter(CacheFilter.java:174)
              at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.i18n.I18nContentSupportFilter.doFilter(I18nContentSupportFilter.java:74)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.RangeSupportFilter.doFilter(RangeSupportFilter.java:84)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
      		        at info.magnolia.cms.security.SecurityCallbackFilter.doFilter(SecurityCallbackFilter.java:84)
              at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.security.LogoutFilter.doFilter(LogoutFilter.java:94)
              at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.module.site.filters.SiteMergeFilter.doFilter(SiteMergeFilter.java:119)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.multisite.filters.MultiSiteFilter.doFilter(MultiSiteFilter.java:106)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.MultiChannelFilter.doFilter(MultiChannelFilter.java:83)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.module.cache.filter.GZipFilter.doFilter(GZipFilter.java:73)
              at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:127)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.enterprise.registration.RegistrationFilter.doFilter(RegistrationFilter.java:64)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.personalization.preview.filter.PreviewFilter.doFilter(PreviewFilter.java:92)
              at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
              at info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:155)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:128)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
              at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
              at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
              at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:107)
              at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67)
              at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:108)
              at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Unknown Source)
      Caused by: org.apache.jackrabbit.spi.commons.conversion.IllegalNameException: '/' not allowed in name
              at org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:103)
              at org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:64)
              at org.apache.jackrabbit.spi.commons.conversion.CachingNameResolver.getQName(CachingNameResolver.java:76)
              at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:74)
              at org.apache.jackrabbit.core.SessionImpl.getQName(SessionImpl.java:638)
              at org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory.getNodeNameQuery(LuceneQueryFactory.java:657)
              ... 159 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mdivilek Milan Divilek
                Reporter:
                evystup Ervín Výstup
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: