Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Mar 20, 2015

This pull request is to replace my previous attempt:
#110

Now I rebased my changes in my feature branch to master.

This pull request introduces a few new things in wicket-native-websocket-core. The basic idea is to prevent hijacking the websocket connections when the request arrives from an invalid origin. The valid origin domains can be configured by the new websocketsettings or can be completely turned off if protection is not necessary.

New classes:

ConnectionRejectedException
IWebSocketConnectionFilter
WebSocketConnectionOriginFilter
WebSocketAbortedPayload
AbortedMessage
WebSocketTesterProcessorTest

New websocket settings:

isHijackingProtectionEnabled
getAllowedDomains

And finally new methods on WebSocketBehavior and WebSocketResource:

onAbort()

The easiest way to understand what's going on is to run the test class:

WebSocketTesterProcessorTest

admin added 5 commits March 20, 2015 10:48
onAbort(). New broadcast message type: AbortedMessage introduced. New
payload type: WebSocketAbortedPayload introduced.
AbstractWebSocketProcessor closes connection when protection check
fails.
@martin-g
Copy link
Member

I'm afraid the PR cannot be used.
Your formatting style caused complete rewrite of the touched files and the meaningful changes are lost in the noise

@ghost
Copy link
Author

ghost commented Mar 20, 2015

No problem! I will reapply them without formatting then! :)

@ghost ghost closed this Mar 20, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant