Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-11593

"entity/list" request is not handled well

    XMLWordPrintableJSON

Details

    Description

      The "entity/list" request has been put in with OFBIZ-11007. It's used to call the entitymaint view and so is a demo/didactic duplicate of entitymaint request. It's only used in FindGeneric screen (look for the WebtoolsBackToEntityList label). It's problematic because since the CSRF token defense was put in you can no longer filter the entities from the entities list screen, even when the default NoCsrfDefenseStrategy is used. It works if you use the entitymaint request instead.

      Anyway, 2020-01-19 I proposed in OFBIZ-11306 a solution for such cases. It was not used because 2020-02-14 I thought it was no longer needed, but it's necessary for this case, and maybe others not already detected:

               if (pathInfo.get(0).indexOf('?') > -1) {
                   return pathInfo.get(0).substring(0, pathInfo.get(0).indexOf('?'));
               } else {
      -            return pathInfo.get(0);
      +            if (1 < StringUtils.countMatches(path, "/")) {
      +                return pathInfo.get(0) + "/" + pathInfo.get(1);
      +            } else {
      +                return pathInfo.get(0);
      +            }
      

      Attachments

        1. image-2020-04-28-14-22-36-940.png
          20 kB
          Rohit Koushal

        Issue Links

          Activity

            People

              jleroux Jacques Le Roux
              jleroux Jacques Le Roux
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: