Skip to content

8381771: Add a check for DNS label not to end with a hyphen#30628

Open
artur-oracle wants to merge 2 commits intoopenjdk:masterfrom
artur-oracle:JDK-8381771
Open

8381771: Add a check for DNS label not to end with a hyphen#30628
artur-oracle wants to merge 2 commits intoopenjdk:masterfrom
artur-oracle:JDK-8381771

Conversation

@artur-oracle
Copy link
Copy Markdown
Member

@artur-oracle artur-oracle commented Apr 8, 2026

RFC 952 specifies that an LDH (Letter-Digit-Hyphen) label may only end with a letter or digit. We should remove hyphens from the set of permissible terminal characters in a label.

Also see:
https://www.icann.org/en/announcements/details/comment-concerning-trailing-hyphen-domain-names-7-1-2000-en

Also adding size checks while we touch this file.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8381771: Add a check for DNS label not to end with a hyphen (Sub-task - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30628/head:pull/30628
$ git checkout pull/30628

Update a local copy of the PR:
$ git checkout pull/30628
$ git pull https://git.openjdk.org/jdk.git pull/30628/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30628

View PR using the GUI difftool:
$ git pr show -t 30628

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30628.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 8, 2026

👋 Welcome back abarashev! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 8, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the security security-dev@openjdk.org label Apr 8, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 8, 2026

@artur-oracle The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 8, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 8, 2026

Webrevs

Copy link
Copy Markdown
Member

@myankelev myankelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.
However, I think testng tests will need to be changed to junit. Do you want to do it as a part of this ticket or I can create a bug and do it after this is merged. I don't mind either way.
What do you prefer?

@artur-oracle
Copy link
Copy Markdown
Member Author

This looks good to me. However, I think testng tests will need to be changed to junit. Do you want to do it as a part of this ticket or I can create a bug and do it after this is merged. I don't mind either way. What do you prefer?

Hi @myankelev! Why would we want to change the test to use junit?

@artur-oracle artur-oracle marked this pull request as draft April 8, 2026 15:04
@artur-oracle artur-oracle changed the title 8381771: Add a check for DNSName not to end with a hyphen 8381771: Add a check for label not to end with a hyphen Apr 8, 2026
@artur-oracle artur-oracle changed the title 8381771: Add a check for label not to end with a hyphen 8381771: Add a check for DNS label not to end with a hyphen Apr 8, 2026
@openjdk openjdk bot removed the rfr Pull request is ready for review label Apr 8, 2026
@artur-oracle artur-oracle marked this pull request as ready for review April 8, 2026 19:58
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 8, 2026
@myankelev
Copy link
Copy Markdown
Member

This looks good to me. However, I think testng tests will need to be changed to junit. Do you want to do it as a part of this ticket or I can create a bug and do it after this is merged. I don't mind either way. What do you prefer?

Hi @myankelev! Why would we want to change the test to use junit?

We just tend to prefer junit and convert testng to it when we have a chance. This is the bug JDK-8307843.

I have created JDK-8381901, I will work on it after this PR is integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfr Pull request is ready for review security security-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants