Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-1795

Posting comments with SchemeEnforcementFilter in operation.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.1.0
    • Component/s: Comments
    • Labels:
      None

      Description

      Hello,

      I have noticed a strange issue when posting comments etc. If the first URL requested is a login page with the SchemeEnforcementFilter in operation the initFilter incorrectly sets the absolute context url to be an HTTPS rather than HTTP. This causes strange goings on as the template page urls can contain mixed urls, feeds can contain duplicate entries, and the POST on the comment sometimes does not work,

      This seems to fix the bug:

      InitFilter getAbsoluteUrl(..)
      // Check init post
      if (request.isSecure())

      { // Someone has requested https: first, so guess what the correct URL is. url = "http://" + request.getServerName() + request.getContextPath(); }

      else

      { // then just add on the context path url += request.getContextPath(); }

        Attachments

          Activity

            People

            • Assignee:
              ghuber Greg Huber
              Reporter:
              gregh Greg Huber
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: