Project

General

Profile

client is not masking frames

Anusha Anusha
Added over 1 year ago

Hi,

According to RFC https://tools.ietf.org/html/rfc6455#section-5 ,

A client MUST mask all frames that it sends to the server (see Section 5.3 for further details). (Note that masking is done whether or not the WebSocket Protocol is running over TLS.) The server MUST close the connection upon receiving a frame that is not masked.

Openfire is closing connection because of this.

2016.03.29 12:09:08 org.jivesoftware.openfire.websocket.XmppWebSocket - Error detected; session: WebSocketSession[websocket=JettyAnnotatedEventDriver[org.jivesoftware.openfire.websocket.XmppWebSocket@12e4150],behavior=SERVER,connection=WebSocketServerConnection@1c218ed{FILLING}{f=Flusher[queueSize=0,aggregateSize=0,failure=null],g=Generator[SERVER,validating],p=Parser@1f2a6e0[ExtensionStack,s=START,c=0,len=131,f=null,p=WebSocketPolicy@1a9c65b[behavior=SERVER,maxTextMessageSize=65536,maxTextMessageBufferSize=32768,maxBinaryMessageSize=65536,maxBinaryMessageBufferSize=32768,asyncWriteTimeout=60000,idleTimeout=300000,inputBufferSize=4096]]},remote=WebSocketRemoteEndpoint@11d909a[batching=true],incoming=JettyAnnotatedEventDriver[org.jivesoftware.openfire.websocket.XmppWebSocket@12e4150],outgoing=ExtensionStack[queueSize=0,extensions=[],incoming=org.eclipse.jetty.websocket.common.WebSocketSession,outgoing=org.eclipse.jetty.websocket.server.WebSocketServerConnection]] 
org.eclipse.jetty.websocket.api.ProtocolException: Client MUST mask all frames (RFC-6455: Section 5.1) 
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:202) 
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258) 
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:628) 
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:476) 
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) 
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) 
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) 
at java.lang.Thread.run(Unknown Source)

Replies (1)

Added by Andrzej Wójcik over 1 year ago

I created tasks to work on providing fix for this issue: #4068 and #4069

    (1-1/1)