{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/3892","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/3892/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/3892/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/3892/events","html_url":"https://github.com/NuGet/Home/issues/3892","id":187898172,"number":3892,"title":"Client \"spams\" autocomplete endpoint of search service ","user":{"login":"skofman1","id":16807822,"avatar_url":"https://avatars.githubusercontent.com/u/16807822?v=3","gravatar_id":"","url":"https://api.github.com/users/skofman1","html_url":"https://github.com/skofman1","followers_url":"https://api.github.com/users/skofman1/followers","following_url":"https://api.github.com/users/skofman1/following{/other_user}","gists_url":"https://api.github.com/users/skofman1/gists{/gist_id}","starred_url":"https://api.github.com/users/skofman1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skofman1/subscriptions","organizations_url":"https://api.github.com/users/skofman1/orgs","repos_url":"https://api.github.com/users/skofman1/repos","events_url":"https://api.github.com/users/skofman1/events{/privacy}","received_events_url":"https://api.github.com/users/skofman1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-08T04:16:52Z","updated_at":"2016-11-09T20:07:37Z","closed_at":null,"body":"The \"autocomplete\" endpoint of the search service gets many illegal requests. Examples:\r\n```\r\nhttps://api-v2v3search-1.nuget.org/autocomplete?q=~/&supportedFramework=netcoreapp1.0&take=100&prerelease=true\r\nhttps://api-v2v3search-0.nuget.org/autocomplete?q=%5C&take=100 \r\nhttps://api-v2v3search-1.nuget.org/autocomplete?q=Micro%5C&supportedFramework=netstandard1.6&take=100&prerelease=true\r\nhttps://api-v2v3search-1.nuget.org/autocomplete?q=Microsoft.AspNetCore.Http.Extensions\"1.&supportedFramework=net452&take=100&prerelease=true\r\nhttps://api-v2v3search-1.nuget.org/autocomplete?q=}&take=100\r\nhttps://api-v2v3search-1.nuget.org/autocomplete?q=-&supportedFramework=netcoreapp1.0&take=100&prerelease=true\r\nhttps://api-v2v3search-1.nuget.org/autocomplete?q=:&supportedFramework=netcoreapp1.0&take=100&prerelease=true\r\nhttps://api-v2v3search-0.nuget.org/autocomplete?q=C:&includePrerelease=false\r\n\r\n```\r\nUp until now, the search service used to fail on those requests and return a 500, since they contain unescaped invalid characters (such as \\, -, }) but this was fixed here: https://github.com/NuGet/NuGetGallery/issues/3330\r\n\r\nHowever, the client shouldn't send autocomplete requests that contain characters that are invalid and package ids, since the result will be empty, and it's an unnecessary load on the server. \r\nI tested VS 2015, project.json editing, and every string that is entered by the user, is sent as is to the autocomplete endpoint."},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/259512784","html_url":"https://github.com/NuGet/Home/issues/3892#issuecomment-259512784","issue_url":"https://api.github.com/repos/NuGet/Home/issues/3892","id":259512784,"user":{"login":"emgarten","id":6381138,"avatar_url":"https://avatars.githubusercontent.com/u/6381138?v=3","gravatar_id":"","url":"https://api.github.com/users/emgarten","html_url":"https://github.com/emgarten","followers_url":"https://api.github.com/users/emgarten/followers","following_url":"https://api.github.com/users/emgarten/following{/other_user}","gists_url":"https://api.github.com/users/emgarten/gists{/gist_id}","starred_url":"https://api.github.com/users/emgarten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emgarten/subscriptions","organizations_url":"https://api.github.com/users/emgarten/orgs","repos_url":"https://api.github.com/users/emgarten/repos","events_url":"https://api.github.com/users/emgarten/events{/privacy}","received_events_url":"https://api.github.com/users/emgarten/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T20:07:37Z","updated_at":"2016-11-09T20:07:37Z","body":"For reference the package id validation code is here:\r\nhttps://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Packaging/PackageCreation/Utility/PackageIdValidator.cs#L14-L16"}}
{"actor":{"display_login":"emgarten"}}