GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — Decline a valueless server_max_window_bits offer by arimu1 · Pull Request #18507 · netty/netty Conversation
|
|
@amirhadadi I don't think is the correct in terms of the RFC. It should decline it |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Motivation: RFC 7692 requires server_max_window_bits in a permessage-deflate offer to carry a value. A missing value is stored as null. Keeping the configured window accepted an offer the server must decline, and the previous parseInt(null) path threw NumberFormatException. Modification: Decline the extension when server_max_window_bits has no value. A valued offer is unchanged: out of range is declined, and an in-range offer is capped at the configured server window. Update the regression test to expect a declined handshake. Result: Fixes netty#13896. A valueless server_max_window_bits offer no longer throws and is not negotiated.
Motivation: RFC 7692 section 7.1 requires a server to decline an offer that contains a parameter with an invalid value. The value of server_max_window_bits and client_max_window_bits is defined as 1*DIGIT without leading zeroes (section 7.1.2). PerMessageDeflateServerExtensionHandshaker parsed it with Integer.parseInt, so a malformed value such as "abc" threw NumberFormatException out of handshakeExtension instead of declining the offer, while values such as "+12" or "012" were accepted. Modification: Parse the window bits with a strict helper that only accepts ASCII digits without a leading zero, and map everything else to a value outside of the allowed range so the offer is declined. Add tests for invalid values of both parameters and for every valid value. Result: A malformed server_max_window_bits or client_max_window_bits offer no longer throws and is declined as the RFC requires. This is a potentially breaking change: offers that were accepted before (for example a signed value or one with leading zeroes) are now declined.
✅ All tests passed ✅🏷️ Commit: 360e4d3 Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@arimu1 can you update the PR description to actually match the code behavior ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
The PerMessageDeflateServerExtensionHandshaker class triggered a NumberFormatException
There was an error while loading. Please reload this page.