Source/WebCore: A client MUST close a connection if it detects a masked frame
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 06:08:40 +0000 (06:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 06:08:40 +0000 (06:08 +0000)
commit12d0f84f5f2ad7613ec60a522049404591d69c80
treeafc43d017f44101a246d871d6128749da243be53
parent3f178b17e5e07a8920582c78e0983d2de5634df9
Source/WebCore: A client MUST close a connection if it detects a masked frame
https://bugs.webkit.org/show_bug.cgi?id=81361

Patch by Li Yin <li.yin@intel.com> on 2012-03-22
Reviewed by Kent Tamura.

A server must not mask any frames that it sends to the client.
Change the test case, not mask the frames from server to client.

Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processFrame):

LayoutTests: [WebSocket]A client must close a connection if it detects a masked frame
https://bugs.webkit.org/show_bug.cgi?id=81361

Patch by Li Yin <li.yin@intel.com> on 2012-03-22
Reviewed by Kent Tamura.

* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt: Added.
* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html: Added.
* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server_wsh.py: Added.
* http/tests/websocket/tests/hybi/unmasked-frames-expected.txt: Renamed from LayoutTests/http/tests/websocket/tests/hybi/masked-frames-expected.txt.
* http/tests/websocket/tests/hybi/unmasked-frames.html: Renamed from LayoutTests/http/tests/websocket/tests/hybi/masked-frames.html.
* http/tests/websocket/tests/hybi/unmasked-frames_wsh.py: Renamed from LayoutTests/http/tests/websocket/tests/hybi/masked-frames_wsh.py.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/invalid-masked-frames-from-server_wsh.py [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/unmasked-frames-expected.txt [moved from LayoutTests/http/tests/websocket/tests/hybi/masked-frames-expected.txt with 94% similarity]
LayoutTests/http/tests/websocket/tests/hybi/unmasked-frames.html [moved from LayoutTests/http/tests/websocket/tests/hybi/masked-frames.html with 90% similarity]
LayoutTests/http/tests/websocket/tests/hybi/unmasked-frames_wsh.py [moved from LayoutTests/http/tests/websocket/tests/hybi/masked-frames_wsh.py with 86% similarity]
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.h