Changeset 279099 in webkit


Ignore:
Timestamp:
Jun 21, 2021 6:24:46 PM (13 months ago)
Author:
Chris Dumez
Message:

Adjust fetch port blocking for ports 990, 989
https://bugs.webkit.org/show_bug.cgi?id=226971
<rdar://problem/79287147>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Re-sync some WPT tests from upstream d41f24fb67a2d65c to gain test coverage from:

  • web-platform-tests/fetch/api/request/request-bad-port.any-expected.txt:
  • web-platform-tests/fetch/api/request/request-bad-port.any.js:
  • web-platform-tests/fetch/api/request/request-bad-port.any.worker-expected.txt:
  • web-platform-tests/tools/wptserve/wptserve/utils.py:

(isomorphic_decode):
(isomorphic_encode):
(is_bad_port):
(http2_compatible):

  • web-platform-tests/websockets/Create-blocked-port.any-expected.txt:
  • web-platform-tests/websockets/Create-blocked-port.any.js:
  • web-platform-tests/websockets/Create-blocked-port.any.worker-expected.txt:
  • web-platform-tests/websockets/constants.sub.js: Added.

(url_has_variant):
(else.url_has_flag):
(url_has_flag):
(IsWebSocket):
(CreateWebSocketNonAbsolute):
(CreateWebSocketNonWsScheme):
(CreateWebSocketNonAsciiProtocol):
(CreateWebSocketWithAsciiSep):
(CreateWebSocketWithBlockedPort):
(CreateWebSocketWithSpaceInUrl):
(CreateWebSocketWithSpaceInProtocol):
(CreateWebSocketWithRepeatedProtocols):
(CreateWebSocketWithRepeatedProtocolsCaseInsensitive):
(CreateWebSocket):

Source/WTF:

Prevent connecting to ports 989 & 990 as per:

  • wtf/URL.cpp:

(WTF::portAllowed):

Location:
trunk
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r279070 r279099  
     12021-06-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Adjust `fetch` port blocking for ports 990, 989
     4        https://bugs.webkit.org/show_bug.cgi?id=226971
     5        <rdar://problem/79287147>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Re-sync some WPT tests from upstream d41f24fb67a2d65c to gain test coverage from:
     10        - https://github.com/web-platform-tests/wpt/pull/29343
     11
     12        * web-platform-tests/fetch/api/request/request-bad-port.any-expected.txt:
     13        * web-platform-tests/fetch/api/request/request-bad-port.any.js:
     14        * web-platform-tests/fetch/api/request/request-bad-port.any.worker-expected.txt:
     15        * web-platform-tests/tools/wptserve/wptserve/utils.py:
     16        (isomorphic_decode):
     17        (isomorphic_encode):
     18        (is_bad_port):
     19        (http2_compatible):
     20        * web-platform-tests/websockets/Create-blocked-port.any-expected.txt:
     21        * web-platform-tests/websockets/Create-blocked-port.any.js:
     22        * web-platform-tests/websockets/Create-blocked-port.any.worker-expected.txt:
     23        * web-platform-tests/websockets/constants.sub.js: Added.
     24        (url_has_variant):
     25        (else.url_has_flag):
     26        (url_has_flag):
     27        (IsWebSocket):
     28        (CreateWebSocketNonAbsolute):
     29        (CreateWebSocketNonWsScheme):
     30        (CreateWebSocketNonAsciiProtocol):
     31        (CreateWebSocketWithAsciiSep):
     32        (CreateWebSocketWithBlockedPort):
     33        (CreateWebSocketWithSpaceInUrl):
     34        (CreateWebSocketWithSpaceInProtocol):
     35        (CreateWebSocketWithRepeatedProtocols):
     36        (CreateWebSocketWithRepeatedProtocolsCaseInsensitive):
     37        (CreateWebSocket):
     38
    1392021-06-21  Rob Buis  <rbuis@igalia.com>
    240
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any-expected.txt

    r276193 r279099  
    5959PASS Request on bad port 601 should throw TypeError.
    6060PASS Request on bad port 636 should throw TypeError.
     61PASS Request on bad port 989 should throw TypeError.
     62PASS Request on bad port 990 should throw TypeError.
    6163PASS Request on bad port 993 should throw TypeError.
    6264PASS Request on bad port 995 should throw TypeError.
    63 PASS Request on bad port 2049 should throw TypeError.
    6465PASS Request on bad port 1719 should throw TypeError.
    6566PASS Request on bad port 1720 should throw TypeError.
    6667PASS Request on bad port 1723 should throw TypeError.
     68PASS Request on bad port 2049 should throw TypeError.
    6769PASS Request on bad port 3659 should throw TypeError.
    6870PASS Request on bad port 4045 should throw TypeError.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any.js

    r275831 r279099  
    2121    43,   // nicname
    2222    53,   // domain
    23     69,   // TFTP
     23    69,   // tftp
    2424    77,   // priv-rjs
    2525    79,   // finger
     
    3939    123,  // ntp
    4040    135,  // loc-srv / epmap
    41     137,  // netbios
    42     139,  // netbios
     41    137,  // netbios-ns
     42    139,  // netbios-ssn
    4343    143,  // imap2
    44     161,  // SNMP
     44    161,  // snmp
    4545    179,  // bgp
    4646    389,  // ldap
     
    6363    601,  // syslog-conn
    6464    636,  // ldap+ssl
     65    989,  // ftps-data
     66    990,  // ftps
    6567    993,  // ldap+ssl
    6668    995,  // pop3+ssl
     69    1719, // h323gatestat
     70    1720, // h323hostcall
     71    1723, // pptp
    6772    2049, // nfs
    68     1719, // H323 (RAS)
    69     1720, // H323 (Q931)
    70     1723, // H323 (H245)
    7173    3659, // apple-sasl
    7274    4045, // lockd
     
    7476    5061, // sips
    7577    6000, // x11
    76     6566, // SANE
     78    6566, // sane-port
    7779    6665, // irc (alternate)
    7880    6666, // irc (alternate)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-bad-port.any.worker-expected.txt

    r276193 r279099  
    5959PASS Request on bad port 601 should throw TypeError.
    6060PASS Request on bad port 636 should throw TypeError.
     61PASS Request on bad port 989 should throw TypeError.
     62PASS Request on bad port 990 should throw TypeError.
    6163PASS Request on bad port 993 should throw TypeError.
    6264PASS Request on bad port 995 should throw TypeError.
    63 PASS Request on bad port 2049 should throw TypeError.
    6465PASS Request on bad port 1719 should throw TypeError.
    6566PASS Request on bad port 1720 should throw TypeError.
    6667PASS Request on bad port 1723 should throw TypeError.
     68PASS Request on bad port 2049 should throw TypeError.
    6769PASS Request on bad port 3659 should throw TypeError.
    6870PASS Request on bad port 4045 should throw TypeError.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/tools/wptserve/wptserve/utils.py

    r269436 r279099  
    126126        601,   # syslog-conn
    127127        636,   # ldap+ssl
     128        989,   # ftps-data
     129        999,   # ftps
    128130        993,   # ldap+ssl
    129131        995,   # pop3+ssl
  • trunk/LayoutTests/imported/w3c/web-platform-tests/websockets/Create-blocked-port.any-expected.txt

    r275831 r279099  
    3939PASS WebSocket blocked port test 139
    4040PASS WebSocket blocked port test 143
    41 PASS WebSocket blocked port test 161
    4241PASS WebSocket blocked port test 179
    4342PASS WebSocket blocked port test 389
     
    6059PASS WebSocket blocked port test 601
    6160PASS WebSocket blocked port test 636
     61PASS WebSocket blocked port test 989
     62PASS WebSocket blocked port test 990
    6263PASS WebSocket blocked port test 993
    6364PASS WebSocket blocked port test 995
    64 PASS WebSocket blocked port test 2049
    6565PASS WebSocket blocked port test 1719
    6666PASS WebSocket blocked port test 1720
    6767PASS WebSocket blocked port test 1723
     68PASS WebSocket blocked port test 2049
    6869PASS WebSocket blocked port test 3659
    6970PASS WebSocket blocked port test 4045
    70 PASS WebSocket blocked port test 5060
    71 PASS WebSocket blocked port test 5061
    7271PASS WebSocket blocked port test 6000
    7372PASS WebSocket blocked port test 6566
  • trunk/LayoutTests/imported/w3c/web-platform-tests/websockets/Create-blocked-port.any.js

    r275831 r279099  
    1 // META: script=websocket.sub.js
     1// META: script=constants.sub.js
     2// META: variant=
     3// META: variant=?wss
     4// META: variant=?wpt_flags=h2
    25
    36async_test(t => {
     
    2629  43,   // nicname
    2730  53,   // domain
    28   69,   // TFTP
     31  69,   // tftp
    2932  77,   // priv-rjs
    3033  79,   // finger
     
    4447  123,  // ntp
    4548  135,  // loc-srv / epmap
    46   137,  // netbios
    47   139,  // netbios
     49  137,  // netbios-ns
     50  139,  // netbios-ssn
    4851  143,  // imap2
    49   161,  // SNMP
    5052  179,  // bgp
    5153  389,  // ldap
     
    6870  601,  // syslog-conn
    6971  636,  // ldap+ssl
     72  989,  // ftps-data
     73  990,  // ftps
    7074  993,  // ldap+ssl
    7175  995,  // pop3+ssl
     76  1719, // h323gatestat
     77  1720, // h323hostcall
     78  1723, // pptp
    7279  2049, // nfs
    73   1719, // H323 (RAS)
    74   1720, // H323 (Q931)
    75   1723, // H323 (H245)
    7680  3659, // apple-sasl
    7781  4045, // lockd
    78   5060, // sip
    79   5061, // sips
    8082  6000, // x11
    81   6566, // SANE
     83  6566, // sane-port
    8284  6665, // irc (alternate)
    8385  6666, // irc (alternate)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/websockets/Create-blocked-port.any.worker-expected.txt

    r275831 r279099  
    3939PASS WebSocket blocked port test 139
    4040PASS WebSocket blocked port test 143
    41 PASS WebSocket blocked port test 161
    4241PASS WebSocket blocked port test 179
    4342PASS WebSocket blocked port test 389
     
    6059PASS WebSocket blocked port test 601
    6160PASS WebSocket blocked port test 636
     61PASS WebSocket blocked port test 989
     62PASS WebSocket blocked port test 990
    6263PASS WebSocket blocked port test 993
    6364PASS WebSocket blocked port test 995
    64 PASS WebSocket blocked port test 2049
    6565PASS WebSocket blocked port test 1719
    6666PASS WebSocket blocked port test 1720
    6767PASS WebSocket blocked port test 1723
     68PASS WebSocket blocked port test 2049
    6869PASS WebSocket blocked port test 3659
    6970PASS WebSocket blocked port test 4045
    70 PASS WebSocket blocked port test 5060
    71 PASS WebSocket blocked port test 5061
    7271PASS WebSocket blocked port test 6000
    7372PASS WebSocket blocked port test 6566
  • trunk/Source/WTF/ChangeLog

    r279085 r279099  
     12021-06-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Adjust `fetch` port blocking for ports 990, 989
     4        https://bugs.webkit.org/show_bug.cgi?id=226971
     5        <rdar://problem/79287147>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Prevent connecting to ports 989 & 990 as per:
     10        - https://github.com/whatwg/fetch/pull/1250
     11
     12        * wtf/URL.cpp:
     13        (WTF::portAllowed):
     14
    1152021-06-21  Fujii Hironori  <Hironori.Fujii@sony.com>
    216
  • trunk/Source/WTF/wtf/URL.cpp

    r278879 r279099  
    958958        601,  // syslog-conn
    959959        636,  // LDAP+SSL
     960        989,  // ftps-data
     961        990,  // ftps
    960962        993,  // IMAP+SSL
    961963        995,  // POP3+SSL
Note: See TracChangeset for help on using the changeset viewer.