Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-12338

query parameter names for NuGet search requests are not case-insensitive

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: NuGet
    • Labels:

      Description

      Fallout from NEXUS-12028: The request log from that ticket suggests that NuGet searches employ case-insensitive query parameters, i.e. /FindPackagesById()?Id=foo vs /FindPackagesById()?id=foo. Our current code however expects case-sensitive query parameters (cf. https://github.com/sonatype/nexus-internal/blob/84a2d0537cb61ea16318e2748019f197bfb6b800/private/plugins/nexus-repository-nuget/src/main/java/com/sonatype/nexus/repository/nuget/odata/ODataUtils.java#L127). This leads to wrong database queries if the parameter case in the request doesn't match the code's expectations, e.g.

      • select from asset where (LOWER(attributes.nuget.id) = :p0) and (bucket=#25:0) ORDER BY attributes.nuget.download_count DESC, id asc, version asc, parameters: [p0=foo] vs
      • select from asset where (bucket=#25:0) ORDER BY attributes.nuget.download_count DESC, id asc, version asc, parameters: [] (missing id criteria)

        Attachments

          Activity

            People

            Assignee:
            jstephens Joseph Stephens
            Reporter:
            bentmann Benjamin Bentmann
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title