Spring Security
  1. Spring Security
  2. SEC-1714

RegexRequestMatcher's matches should append question mark after path info and before query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0.RC1
    • Fix Version/s: 3.1.0.RC2
    • Component/s: Web
    • Labels:
      None

      Description

              if (pathInfo != null || query != null) {
                  StringBuilder sb = new StringBuilder(url);
      
                  if (pathInfo != null) {
                      sb.append(pathInfo);
                  }
      
                  if (query != null) {
                      sb.append(query);
                  }
                  url = sb.toString();
              }
      

      should be replaced with something similar to

              if (pathInfo != null || query != null) {
                  StringBuilder sb = new StringBuilder(url);
      
                  if (pathInfo != null) {
                      sb.append(pathInfo);
                  }
      
                  if (query != null) {
                      sb.append("?").append(query);
                  }
                  url = sb.toString();
              }
      

        Activity

        Hide
        Luke Taylor added a comment -

        Good point. I've change the code to append the question mark when there's a query string.

        Show
        Luke Taylor added a comment - Good point. I've change the code to append the question mark when there's a query string.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Stevo Slavić
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: