Fix version parsing, validate debian package version#1601
Open
jaymzh wants to merge 1 commit into
Open
Conversation
0b4907f to
ad30f63
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1601 +/- ##
==========================================
- Coverage 77.37% 77.12% -0.26%
==========================================
Files 165 165
Lines 15747 15776 +29
==========================================
- Hits 12185 12167 -18
- Misses 2356 2407 +51
+ Partials 1206 1202 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This patch is based on one originally by Aaron Foster <afoster@cloudflare.com>, to prevent invalid versions. However, applying it revealed an underlying issue in the Aptly version parsing - the spec says the "debian version" is the part of the the _last_ hyphen, not the first hyphen, and that caused packages that were valid to fail validation, so I've fixed the parsing here, and updated the tests. Signed off with internal and external emails for clarity, but commit is under personal email where we typically do open source contributions from. Signed-off-by: Phil Dibowitz <pdibowitz@cloudflare.com> Signed-off-by: Phil Dibowitz <pdibowitz@ipom.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch is based on one originally by Aaron Foster
afoster@cloudflare.com, to prevent invalid versions.
However, applying it revealed an underlying issue in the Aptly version
parsing - the spec says the "debian version" is the part after the
last hyphen, not the first hyphen, and that caused packages that were
valid to fail validation, so I've fixed the parsing here, and updated
the tests.
Signed off with internal and external emails for clarity, but commit
is under personal email where we typically do open source contributions
from.
Signed-off-by: Phil Dibowitz pdibowitz@cloudflare.com
Signed-off-by: Phil Dibowitz pdibowitz@ipom.com