Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4934

Redirect to wrong port after upgrade from 2.3.24 to 2.3.32

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • 2.3.32
    • None
    • Java : 1.5

      Server : Websphere 6.1

    Description

      Recently we upgraded our struts version from 2.3.24 to 2.3.32, as old version has some vulnerabilities. After upgration there were some issues, but we manage to fix them somehow. But there is still one issue pending that it is for redirect.

      <action name="multisiteChangeAction" class="com.inetpsa.aga.web.actions.PdvAction" method="multisiteChangeAction">
      <result type="redirect">${requete.getHeader("referer")}</result>
      </action>

      where requete is HttpServletRequest object, it has getter method also.

      Before upgradtion this thing was working fine. But now its not working, after redirect, port is getting added in url, so it fails.

      e.g. 

      http://agenda.host.com redirects to 

      http://agenda.host.com:9082

      In logs we found 

       

      [17/04/18 11:14:46:238 CEST] 0000002f SystemErr     R 2018-04-17 11:14:46,238  WARN (com.opensymphony.xwork2.ognl.SecurityMemberAccess:64) - Package of target [org.apache.struts2.dispatcher.StrutsRequestWrapper@79f979f9] or package of member [public java.lang.String javax.servlet.http.HttpServletRequestWrapper.getHeader(java.lang.String)] are excluded!

       

      We also tried 

      <action name="multisiteChangeAction" class="com.inetpsa.aga.web.actions.PdvAction" method="multisiteChangeAction">
      <result type="redirect">/planningReceptionnaire.action</result>
      </action>

      In this case, above warn is not printed in log, but it didnt worl

      So plewase can you help me to fix this issue.

      Thank you.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            shailesh.agrawal@ext.mpsa.com Shailesh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment