Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13151

api/issues/search page size parameter negative value should not be allowed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.1
    • Fix Version/s: 8.5
    • Component/s: Issues, Web API
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      The actual behaviour of the API if the "ps" parameter is negative is to use the maximum value "500" instead. But the error returned if we query too much results in ES is not the same as if we specify ps=500 :

      https://next.sonarqube.com/sonarqube/api/issues/search?p=21&ps=-1

       

      https://next.sonarqube.com/sonarqube/api/issues/search?p=21&ps=500

      We should enforce ps to be between 1-500.

        Attachments

          Activity

            People

            Assignee:
            duarte.meneses Duarte Meneses
            Reporter:
            pierre.guillot Pierre Guillot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: