You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If someone handcrafts the https://www.nuget.org/packages/{id}/license URL pattern with a package ID but no package version, and HTTP 500 is returned. We don't link to this page directly (AFAIK) so it's not a huge deal, but we should either 404 or show the version information of the latest package.
System.ArgumentException: version
at NuGetGallery.CorePackageService.FindPackageByIdAndVersionStrict(String id, String version) in D:\a\_work\1\s\src\Gallery\submodules\Gallery\src\NuGetGallery.Core\Services\CorePackageService.cs:line 226
at NuGetGallery.PackagesController.<License>d__68.MoveNext() in D:\a\_work\1\s\src\Gallery\submodules\Gallery\src\NuGetGallery\Controllers\PackagesController.cs:line 1175
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
It should return a 404 or show the license for the latest version, similar to how https://www.nuget.org/packages/{id} shows the package details page for the latest version.
Screenshots
Additional Context and logs
No response
The text was updated successfully, but these errors were encountered:
Impact
It bothers me. A fix would be nice
Describe the bug
If someone handcrafts the
https://www.nuget.org/packages/{id}/license
URL pattern with a package ID but no package version, and HTTP 500 is returned. We don't link to this page directly (AFAIK) so it's not a huge deal, but we should either 404 or show the version information of the latest package.Repro Steps
Compare the output of these 2 URLs:
HTTP 500
WORKS
Expected Behavior
It should return a 404 or show the license for the latest version, similar to how
https://www.nuget.org/packages/{id}
shows the package details page for the latest version.Screenshots
Additional Context and logs
No response
The text was updated successfully, but these errors were encountered: