-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Split regex for first (os and version) and further components (arch, variant) - Update regular expression to preserve the existing set of accepted characters for the OS part of the first element (avoid accepting ".", ")", "("). - Make regular expression for osVersion more strict, and only accept dot-separated numbers. - Add capture groups to the osAndVersion regular expression so that the result can be consumed directly, without having to split after validating. - Now that we already separate OS asnd OSVersion ahead; simplify normalizeOS to only normalize the OS. - Remove the OSAndVersionFormat variable, and inline it. - Update Parse() to prevent un-bounded string splitting. Signed-off-by: Sebastiaan van Stijn <[email protected]>
- Loading branch information
Showing
3 changed files
with
49 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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