Skip to content

Capture all JDK version components when detecting releases - #899

Open
Ahmed Muhsin (ahmedmuhsin) wants to merge 1 commit into
devfrom
fix/jdk-version-parsing
Open

Ahmed Muhsin (ahmedmuhsin) wants to merge 1 commit into
devfrom
fix/jdk-version-parsing

Conversation

@ahmedmuhsin

Copy link
Copy Markdown
Contributor

The version regex matched exactly three numeric components, so Microsoft's 21.0.12.1 release was recorded as 21.0.12. The truncated version is still a real download, and validation compared the downloaded JDK against the already-truncated string, so the wrong pin shipped without anything failing. All four Microsoft OpenJDKs were affected this cycle.

Now captures every dotted component. Microsoft publishes three, four and five component versions (11.0.32, 21.0.12.1, 11.0.13.8.1).

Verified by reverting the fix (14 cases fail, and only the ones that should) and restoring it. Live lookups resolve 11.0.32.1, 17.0.20.1, 21.0.12.1, 25.0.4.1.

The version regex matched exactly three numeric components, so a release
like 21.0.12.1 was recorded as 21.0.12. That truncated version is still a
real download, and validation compared the downloaded JDK against the
already-truncated string using a substring test, so the wrong pin shipped
without anything failing.

Microsoft OpenJDK publishes three, four and five component versions
(11.0.32, 21.0.12.1, 11.0.13.8.1), so capture every dotted component.
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

Successfully merging this pull request may close these issues.

2 participants