Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
net: update list of bad ports
  • Loading branch information
gterzian committed Jun 4, 2020
1 parent ca68631 commit 7d51997
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/net/fetch/methods.rs
Expand Up @@ -929,11 +929,11 @@ fn is_network_scheme(scheme: &str) -> bool {

/// <https://fetch.spec.whatwg.org/#bad-port>
fn is_bad_port(port: u16) -> bool {
static BAD_PORTS: [u16; 64] = [
static BAD_PORTS: [u16; 67] = [
1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 77, 79, 87, 95, 101, 102,
103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 139, 143, 179, 389, 465, 512, 513,
514, 515, 526, 530, 531, 532, 540, 556, 563, 587, 601, 636, 993, 995, 2049, 3659, 4045,
6000, 6665, 6666, 6667, 6668, 6669,
103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 139, 143, 179, 389, 427, 465, 512,
513, 514, 515, 526, 530, 531, 532, 540, 548, 556, 563, 587, 601, 636, 993, 995, 2049, 3659,
4045, 6000, 6665, 6666, 6667, 6668, 6669, 6697,
];

BAD_PORTS.binary_search(&port).is_ok()
Expand Down

0 comments on commit 7d51997

Please sign in to comment.