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

Backport sanity-checks against NPEs to old URI mappings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.6, 5.6
    • Component/s: core
    • Labels:

      Description

      Problem was addressed already in the new virtual-uri module; here we apply it to the deprecated mappings in core.

      Step to reproduce:

      • In /modules/ui-admincentral/virtualURIMapping
      • Create a contentNode tours
      • Add prop class and enter value info.magnolia.virtualuri.mapping.RegexpVirtualUriMapping
      • Add prop fromUri, haven’t yet entered the value
      • Admincentral stopped

      Error log:

      java.lang.NullPointerException
      	java.util.regex.Matcher.appendReplacement(Matcher.java:804)
      	java.util.regex.Matcher.replaceAll(Matcher.java:955)
      	info.magnolia.cms.beans.config.RegexpVirtualURIMapping.mapURI(RegexpVirtualURIMapping.java:74)
      	info.magnolia.cms.beans.config.RegexpVirtualURIMapping.mapURI(RegexpVirtualURIMapping.java:57)
      	info.magnolia.virtualuri.compatibility.VirtualUriMappingAdapter.mapUri(VirtualUriMappingAdapter.java:66)
      	info.magnolia.virtualuri.VirtualUriFilter.lambda$doFilter$0(VirtualUriFilter.java:92)
      	java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
      	java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:479)
      	java.util.stream.ReferencePipeline.max(ReferencePipeline.java:515)
      	info.magnolia.virtualuri.VirtualUriFilter.doFilter(VirtualUriFilter.java:95)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.module.cache.executor.Bypass.processCacheRequest(Bypass.java:58)
      	info.magnolia.module.cache.executor.CompositeExecutor.processCacheRequest(CompositeExecutor.java:67)
      	info.magnolia.module.cache.filter.CacheFilter.doFilter(CacheFilter.java:220)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.i18n.I18nContentSupportFilter.doFilter(I18nContentSupportFilter.java:89)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.RangeSupportFilter.doFilter(RangeSupportFilter.java:77)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
      	info.magnolia.cms.security.SecurityCallbackFilter.doFilter(SecurityCallbackFilter.java:84)
      	info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.security.LogoutFilter.doFilter(LogoutFilter.java:94)
      	info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.module.site.filters.SiteMergeFilter.doFilter(SiteMergeFilter.java:119)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.MultiChannelFilter.doFilter(MultiChannelFilter.java:83)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.module.cache.filter.GZipFilter.doFilter(GZipFilter.java:73)
      	info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
      	info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:127)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.UnicodeNormalizationFilter.doFilter(UnicodeNormalizationFilter.java:89)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
      	info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:155)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:128)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
      	info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
      	info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
      	info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:107)
      	info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67)
      	info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:108)
      	info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              oanh.thai Oanh Thai Hoang
              Reporter:
              oanh.thai Oanh Thai Hoang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2d Original Estimate - 2d
                  2d
                  Remaining:
                  Time Spent - 2d 6.5h Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - 2d 6.5h Remaining Estimate - 1h
                  2d 6.5h