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

JDK-8261969: SNIHostName should check if the encoded hostname conform to RFC 3490 #2639

Closed
wants to merge 3 commits into from
Closed

Conversation

johnshajiang
Copy link
Member

@johnshajiang johnshajiang commented Feb 19, 2021

Similar to the constructor SNIHostName(String hostname), the constructor SNIHostName(byte[] encoded) also needs to check if the encoded hostname conform to RFC 3490.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8261969: SNIHostName should check if the encoded hostname conform to RFC 3490

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2639/head:pull/2639
$ git checkout pull/2639

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 19, 2021

👋 Welcome back jjiang! 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

openjdk bot commented Feb 19, 2021

@johnshajiang The following labels will be automatically applied to this pull request:

  • net
  • security

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

@openjdk openjdk bot added security security-dev@openjdk.org net net-dev@openjdk.org labels Feb 19, 2021
@johnshajiang
Copy link
Member Author

/label remove net

@openjdk openjdk bot removed the net net-dev@openjdk.org label Feb 19, 2021
@openjdk
Copy link

openjdk bot commented Feb 19, 2021

@johnshajiang
The net label was successfully removed.

@johnshajiang johnshajiang marked this pull request as ready for review February 19, 2021 12:01
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 19, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 19, 2021

Webrevs

private static void checkHostname(String hostname) throws Exception {
try {
new SNIHostName(hostname);
throw new Exception("Expected to get IllegalArgumentException for "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new Exception("Expected to get IllegalArgumentException for "
throw new RuntimeException("Expected to get IllegalArgumentException for "

private static void checkHostname(byte[] encodedHostname) throws Exception {
try {
new SNIHostName(encodedHostname);
throw new Exception("Expected to get IllegalArgumentException for "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new Exception("Expected to get IllegalArgumentException for "
throw new RuntimeException("Expected to get IllegalArgumentException for "

@johnshajiang johnshajiang changed the title JDK-8261969: SNIHostName would check if the encoded hostname conform to RFC 3490 JDK-8261969: SNIHostName should check if the encoded hostname conform to RFC 3490 Feb 22, 2021
@johnshajiang
Copy link
Member Author

I wouldn't merge the master to this branch :-(

@johnshajiang
Copy link
Member Author

Could the latest patch be reviewed?

@openjdk
Copy link

openjdk bot commented Mar 2, 2021

@johnshajiang This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8261969: SNIHostName should check if the encoded hostname conform to RFC 3490

Reviewed-by: rhalade, xuelei

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 102 new commits pushed to the master branch:

  • c92f3bc: 8262876: Shenandoah: Fix comments regarding VM_ShenandoahOperation inheritances
  • 20b9ba5: 8262875: doccheck: empty paragraphs, etc in java.base module
  • f304b74: 8261859: gc/g1/TestStringDeduplicationTableRehash.java failed with "RuntimeException: 'Rehash Count: 0' found in stdout"
  • f18c019: 8247373: ArraysSupport.newLength doc, test, and exception message
  • 96c4321: 8262424: Change multiple get_java_xxx() functions in thread.cpp into one function
  • 0de6abd: 8260966: (fs) Consolidate Linux and macOS implementations of UserDefinedFileAttributeView
  • 5f4bc0a: 8253100: Fix "no comment" warnings in java.base/java.net
  • d185a6c: 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now"
  • 85a5ae8: 8261606: Surprising behavior of step over in String switch
  • be67aaa: 8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack
  • ... and 92 more: https://git.openjdk.java.net/jdk/compare/a30fb4fc689a501a59fa86f850b6f79f3178392a...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 2, 2021
Copy link
Member

@rhalade rhalade left a comment

Choose a reason for hiding this comment

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

Thanks for updating the test.

@johnshajiang
Copy link
Member Author

/integrate

@rhalade @XueleiFan Thanks for your reviews!

@openjdk openjdk bot closed this Mar 2, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 2, 2021
@openjdk
Copy link

openjdk bot commented Mar 2, 2021

@johnshajiang Since your change was applied there have been 102 commits pushed to the master branch:

  • c92f3bc: 8262876: Shenandoah: Fix comments regarding VM_ShenandoahOperation inheritances
  • 20b9ba5: 8262875: doccheck: empty paragraphs, etc in java.base module
  • f304b74: 8261859: gc/g1/TestStringDeduplicationTableRehash.java failed with "RuntimeException: 'Rehash Count: 0' found in stdout"
  • f18c019: 8247373: ArraysSupport.newLength doc, test, and exception message
  • 96c4321: 8262424: Change multiple get_java_xxx() functions in thread.cpp into one function
  • 0de6abd: 8260966: (fs) Consolidate Linux and macOS implementations of UserDefinedFileAttributeView
  • 5f4bc0a: 8253100: Fix "no comment" warnings in java.base/java.net
  • d185a6c: 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now"
  • 85a5ae8: 8261606: Surprising behavior of step over in String switch
  • be67aaa: 8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack
  • ... and 92 more: https://git.openjdk.java.net/jdk/compare/a30fb4fc689a501a59fa86f850b6f79f3178392a...master

Your commit was automatically rebased without conflicts.

Pushed as commit 4f4d0f5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@johnshajiang johnshajiang deleted the jdk-8261969 branch March 2, 2021 22:37
iignatev added a commit to iignatev/jdk that referenced this pull request Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
3 participants