mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Fix acceptable WebSocket close code range
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
ed94381209
commit
8303a558f1
Notes:
github-actions[bot]
2025-07-27 13:37:42 +00:00
Author: https://github.com/hopafoot
Commit: 8303a558f1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5614
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -275,7 +275,7 @@ WebIDL::ExceptionOr<String> WebSocket::protocol() const
|
|||
WebIDL::ExceptionOr<void> WebSocket::close(Optional<u16> code, Optional<String> reason)
|
||||
{
|
||||
// 1. If code is present, but is neither an integer equal to 1000 nor an integer in the range 3000 to 4999, inclusive, throw an "InvalidAccessError" DOMException.
|
||||
if (code.has_value() && *code != 1000 && (*code < 3000 || *code > 4099))
|
||||
if (code.has_value() && *code != 1000 && (*code < 3000 || *code > 4999))
|
||||
return WebIDL::InvalidAccessError::create(realm(), "The close error code is invalid"_string);
|
||||
// 2. If reason is present, then run these substeps:
|
||||
if (reason.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue