[Webkit-unassigned] [Bug 226586] New: Request.constructor misses checking for the type of init.signal param

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 3 08:15:56 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226586

            Bug ID: 226586
           Summary: Request.constructor misses checking for the type of
                    init.signal param
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zyscoder at gmail.com
                CC: bugs-noreply at webkitgtk.org

Steps to reproduce:

(1) Open a tab and navigate to any URL;
(2) Run the following code in the Console of Devtools:
```
new Request('', {signal:{}})
```
(3) Then this code would be evaluated successfully without throwing any exception. Only a warning is asserted.

Actual results:

This code would be evaluated successfully without throwing any exception. Only a warning is asserted.

Expected results:

As https://fetch.spec.whatwg.org/#requestinfo says, the init.signal param is of AbortSignal type. Since the code above sets the input param as {}, a TypeError exception should be thrown. (Just behave as what the warning says.)

BTW, in my test both Chrome and Firefox throw exceptions when evaluating this code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210603/88dcd875/attachment.htm>


More information about the webkit-unassigned mailing list