Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version validation should use the original NuGet.Core regex to ensure compat #3226

Closed
emgarten opened this issue Sep 6, 2016 · 0 comments
Closed

Comments

@emgarten
Copy link
Member

emgarten commented Sep 6, 2016

The gallery disallows some versions that are incompatible with NuGet 2.x clients, but misses others. This could be solved by verifying the package version against the original regex used by NuGet.Core.dll.

Regex: https://github.com/NuGet/NuGet2/blob/2.13/src/Core/SemanticVersion.cs#L19

Currently handled by the gallery

Not handled:

  • A label with dash only. ex: 1.0.0-- (not numeric, but also not supported by 2.x)
  • Build metadata in the version, ex: 1.0.0+meta
  • Invalid versions in dependency ranges. The 2.x client will ignore these internally and turn them into a range accepting all, which can cause problems.

Example packages

https://www.nuget.org/packages/semverA/
https://www.nuget.org/packages/SemVerDashOnly/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants