IBM Support

PI54235: A redirect using an URI relative to the current request URL redi rects to the wrong URL

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Calling sendRedirect() to a relative URI might redirect to
    the wrong URL if the following conditions are true:
    
    1) the servlet/filter mapping ends exactly with the context
    root
    2) the redirect URI is relative to the current request URL
    
    For example:
    
    -The applications's context root is "/ContextRoot"
    -ServletA is mapped to "/a/ContextRoot"
    -A request to http://example.com/ContextRoot/a/ContextRoot
    is submitted
    -The following method is invoked in the servlet:
    		response.sendRedirect("../resources/index.jsp");
    
    This results in a redirect to
    "http://example.com/ContextRoot/a/resources/index.jsp". The
    expectation is a redirect to
    "http://example.com/ContextRoot/resources/index.jsp". This
    is a regression caused by APAR PI22830.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Full       *
    *                  Profile versions 8.0 and 8.5.5 and Liberty  *
    *                  Profile version 8.5.5 users of              *
    *                  WebContainer                                *
    ****************************************************************
    * PROBLEM DESCRIPTION: A redirect using a URI relative to the  *
    *                      current request URL redirects to an     *
    *                      incorrect URL                           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Starting on fixpacks 8.0.0.10 and 8.5.5.4 a call to
    javax.servlet.http.HttpServletResponse.sendRedirect() using a
    relative URI as a parameter might redirect to an incorrect URL
    if the following conditions are true:
    	1) the servlet/filter mapping ends exactly with the context
    root
    	2) the redirect URI is relative to the current request URL
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PI54235

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-12-15

  • Closed date

    2016-02-24

  • Last modified date

    2016-02-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP



Document information

More support for: WebSphere Application Server Liberty Core

Software version: 855

Reference #: PI54235

Modified date: 24 February 2016