Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Conversation

ac000
Copy link
Member

@ac000 ac000 commented Feb 21, 2025

This pull-request comprises two patches.

  • java: websocket: Fix calculation of payload length for > 32bit values

This fixes a calculation that was done as an int when it should have been treated as a long.

  • java: websocket: Additional payload length validation

This adds a check for negative payload lengths.

Both these patches were applied to the Apache Tomcat sources a number of years ago. Original patch links are in the commit messages.

The following changes since commit 3fea47eaa3edd916ecf0b339626dd5f963838295:

  python: Add Django 5.x compatibility (2025-02-21 01:20:31 +0000)

are available in the Git repository at:

  git@github.com:ac000/unit.git java

for you to fetch changes up to d7afeb2b94f1cd72ed02403609e5484f9514e5eb:

  java: websocket: Additional payload length validation (2025-02-21 22:49:15 +0000)

----------------------------------------------------------------
Mark Thomas (2):
      java: websocket: Fix calculation of payload length for > 32bit values
      java: websocket: Additional payload length validation

 src/java/nginx/unit/websocket/WsFrameBase.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

@ac000 ac000 marked this pull request as ready for review February 22, 2025 00:08
@ac000 ac000 requested a review from hongzhidao February 22, 2025 00:08
@ac000 ac000 merged commit d7afeb2 into nginx:master Feb 22, 2025
25 checks passed
@ac000
Copy link
Member Author

ac000 commented Feb 22, 2025

Thanks Zhidao!

@ac000 ac000 deleted the java branch February 22, 2025 01:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants