/
989.txt
78 lines (53 loc) · 3.12 KB
/
989.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
* 仕様書
[REFS[
- [2] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#dom-websocket>
]REFS]
* HTTP
@@ XXX
* WebSocket
[3] [[利用者エージェント]]が接続しないように設定されている[[ポート]]が指定されたら、
[CODE(DOMe)@en[[[SecurityError]]]] [[例外]]を投げなければ[['''なりません''']] [SRC[>>2]]。
[4] ただし [CODE(HTTP)[[[80]]]] と [CODE(HTTP)[[[443]]]] は、
制限する[['''べきではありません''']] [SRC[>>2]]。
;; [6] [CODE(HTTP)[[[80]]]] への [CODE(URI)@en[[[wss:]]]] や
[CODE(HTTP)[[[443]]]] への [CODE(URI)@en[[[ws:]]]] であっても、
制限するべきではありません [SRC[>>2]]。
* OS 以遠
[11] [[Webブラウザー]]独自の制限に加えて、 [[OS]] のネットワークスタックレベルでの
([[利用者]]や管理者の設定による) 制限があるかもしれません。
[12] 所属[[ネットワーク]]などの ([[ルーター]]等の) 制限で、接続できない[[ポート]]があるかもしれません。
[13] こうした制限は、実際に接続を試みないと[[Webブラウザー]]からは検知できませんから、
[[OS]] に接続の開始を指示した後、拒まれたとのエラーになったり、
接続を開始した後にタイムアウトで[[ネットワークエラー]]となったりします。
* 実装
[1] [CITE[Mozilla Port Blocking]]
([TIME[2009-06-17 19:41:15 +09:00]] 版)
<http://www.mozilla.org/projects/netlib/PortBanning.html>
[5] [CITE@en[Safari blocks content on some non-standard ports - Apple Support]] ([TIME[2015-03-31 15:02:33 +09:00]] 版) <https://support.apple.com/en-il/HT203772>
[FIG(quote)[
[FIGCAPTION[
[7] [CITE@en-GB-x-hixie[HTML Standard]]
([TIME[2015-03-15 01:40:28 +09:00]] 版)
<https://html.spec.whatwg.org/#dom-websocket>
]FIGCAPTION]
> If port is a port to which the user agent is configured to block access, then throw a SecurityError exception and abort these steps. (User agents typically block access to well-known ports like SMTP.)
> Access to ports 80 and 443 should not be blocked, including the unlikely cases when secure is false but port is 443 or secure is true but port is 80.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[8] [CITE@en[HTTP/HTTPS Port-Blocking in WinINET - IEInternals - Site Home - MSDN Blogs]]
([TIME[2015-03-31 16:25:26 +09:00]] 版)
<http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/9769913.aspx>
]FIGCAPTION]
> IE8's current port-block list contains:
>
> 19 (chargen), 21 (ftp), 25 (smtp), 110 (pop3), 119 (nntp), 143 (imap2), 220 (imap3), 993 (secure imap)
>
> Blocking ports 220 and 993 is new to IE8.
]FIG]
[9] [CITE@en[Paper: HTML Form Protocol Attack]]
([[Jochen Topf]] 著, [TIME[2014-08-30 04:49:30 +09:00]] 版)
<http://www.remote.org/jochen/sec/hfpa/index.html>
[10] [CITE[Part2 - browsersec - Browser Security Handbook, part 2 - Browser Security Handbook - Google Project Hosting]]
([TIME[2015-03-31 16:41:34 +09:00]] 版)
<https://code.google.com/p/browsersec/wiki/Part2#Port_access_restrictions>