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

bootBuildImage runs forever when a custom image name is used and the tag contains an illegal character #39246

Closed
ilozano2 opened this issue Jan 19, 2024 · 4 comments
Labels
status: superseded An issue that has been superseded by another

Comments

@ilozano2
Copy link

Spring Boot Version: 3.2.1

Issue

Given a image reference <hostname>/<library>/<artifact>:1.0.0+1.2.3
When the length of or is long, the method ImageReference.of(...) freezes

Tests: 30c4bd1

Related: #23115

TL;DR

Internally, the Regex.PATH generated is ^[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?(?:(?:[\/][a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ which will report a Catastrophic Backtracking (you can see it in regex101 for example).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 19, 2024
@wilkinsona
Copy link
Member

See also #35657.

@wilkinsona
Copy link
Member

Thanks, @ilozano2. Is the plan for https://github.com/pivotal-cf/vmware-app-analyzer/issues/240 to include a + character in the image's tag? AIUI, + isn't a permitted character in a tag and any fix for this issue would result in such an image reference being rejected.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Jan 19, 2024
@ilozano2
Copy link
Author

@wilkinsona In fact, it isn't. Docker images don't support that character in the TAG.

We are following a different format. No rush here then, but it could be nice to fail without freezing.
Thanks!

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jan 19, 2024
@wilkinsona wilkinsona changed the title (re-open) bootBuildImage runs forever when a custom image name is used and the version contains an illegal character bootBuildImage runs forever when a custom image name is used and the tag contains an illegal character Jan 19, 2024
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Jan 19, 2024
@wilkinsona wilkinsona added this to the 3.1.x milestone Jan 19, 2024
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 18, 2024
…ter in tag

- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 18, 2024
…n tag

- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 18, 2024
- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 18, 2024
- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 19, 2024
- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 20, 2024
- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
wanger26 added a commit to wanger26/spring-boot that referenced this issue Feb 20, 2024
- Simplify regular expression checking for validity of Image Reference to fix Catastrophic Backtracking for long custom images with illegal characters in tag

spring-projects#39246
@scottfrederick
Copy link
Contributor

Closing in favor of #39617

@scottfrederick scottfrederick closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@scottfrederick scottfrederick added status: superseded An issue that has been superseded by another and removed type: bug A general bug labels Feb 20, 2024
@scottfrederick scottfrederick removed this from the 3.1.x milestone Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

4 participants