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

Struts2 Rest plugin doesn't handle JSESSIONID with DMI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.24
    • Fix Version/s: 2.3.28, 2.5
    • Component/s: Plugin - REST
    • Labels:
      None
    • Environment:

      tomcat

      Description

      If a url with DMI and with a JSESSIONID is sent to a Struts2 action, a failure will result

      see this modified unit test from the plugin unit test:

          public void testGetJsessionIdSemicolonMappingWithMethod() throws Exception {
              req.setRequestURI("/myapp/animals/dog/fido!update;jsessionid=29fefpv23do1g");
              req.setServletPath("/animals/dog/fido");
              req.setMethod("GET");
      
              mapper.setAllowDynamicMethodCalls("true");
      
              ActionMapping mapping = mapper.getMapping(req, configManager);
      
              assertEquals("/animals", mapping.getNamespace());
              assertEquals("dog", mapping.getName());
              assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]);
              assertEquals("update", mapping.getMethod());
          }
      

        Attachments

          Activity

            People

            • Assignee:
              aleksandr-m Aleksandr Mashchenko
              Reporter:
              rpii Rich Peters
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: