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

Using MagnoliaFilterChain as <dispatcher>FORWARD</dispatcher> could crash the system

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.5 RC1
    • 3.0 RC3
    • core
    • None

    Description

      /DocSpesaFrom.html is my page
      /templates/jsp/docSpesaForm.jsp is the template associated with my page

      When I call my page what happens is>
      1)cms filter handle requestURI /DocSpesaFrom.html and forward to /templates/jsp/docSpesaForm.jsp
      2)again in the cms filter. It should handle(skip in my case) /templates/jsp/docSpesaForm.jsp but Path.getURI(request) return "/DocSpesaFrom.html", we are back to step 1) end here loop starts.

      I resolved this problem introducing this few trivial lines in MgnlCmsFilter.doFilter():
      // Introduced to allow request forward when dispatching filters
      // If Path class find "MGNL_REQUEST_URI_DECODED" attribute, cms filter loop
      // If Path class miss it, the attribute gets aligned with current requestURI
      if (req.getAttribute("CHECK_FWD") != null)

      { log.debug("Already been in Filter Cms"); req.removeAttribute(MGNL_REQUEST_URI_DECODED);}

      else

      { log.debug("First time in Filter Cms"); req.setAttribute("CHECK_FWD", new Integer(0)); }

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                fgiust Fabrizio Giustina
                filippo_fratoni Filippo Fratoni
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD