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

Add option to NOT fallback to empty namespace when unresolved

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 6.6.0
    • Core
    • None

    Description

      Currently, when a namespace cannot be resolved from a request URL, it falls back to the empty namespace.

      This effectively allows all Actions which are defined for the empty namespace to be accessed from an infinite number of endpoints.

      For example, you may have an Action defined in the empty namespace, intended for access at:
      www.domain.com/login.action

      However, due to the current fallback behaviour, this Action can actually be accessed at any non-resolving namespace, eg.:
      www.domain.com/what/about/this/login.action

      This behaviour is not usually beneficial and could lead to bugs if a developer only expects their Action to be accessible at a very specific URL. Many developers may not be aware of these Action resolving quirks of Struts.

      As far as I can tell, there is not currently an option to prevent this behaviour, so I propose we add one.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kusal Kusal Kithul-Godage
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m