Skip to content

Cases 2.10 and 2.11: don't reward denial-of-service behavior #101

@wbudd

Description

@wbudd

RingSocket follows this RFC 6455 quote to the letter:

If an endpoint receives a Ping frame and has not yet sent Pong frame(s) in response to previous Ping frame(s), the endpoint MAY elect to send a Pong frame for only the most recently processed Ping frame.

Sending multiple pings in rapid succession is much more likely to be a form of denial-of-service attack than to be the result of a valid practical scenario. Only responding to the last ping is a pragmatic way to mitigate that potential for abuse, so deviating from RFC 6455 the way autobahn-testsuite does in case 2.10 and 2.11 can IMO only be interpreted as a bug.

Below is what autobahn-testsuite reports as the reason for marking these cases' outcome as a Fail, whereas as I argue that the Observed data listed should be at least as valid/expected as the listed Expected data:

Case Description

Send 10 Pings with payload.

Case Expectation

Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway. Clean close with normal code.

Case Outcome

Actual events differ from any expected.

Expected:
{'OK': [('pong', u'payload-0'), ('pong', u'payload-1'), ('pong', u'payload-2'), ('pong', u'payload-3'), ('pong', u'payload-4'), ('pong', u'payload-5'), ('pong', u'payload-6'), ('pong', u'payload-7'), ('pong', u'payload-8'), ('pong', u'payload-9')]}

Observed:
[('pong', u'payload-9')]

I note that you're aware of this spec deviation, but I believe it would be a good idea to change this behavior sometime.

PS: Autobahn-testsuite saved me lots of time testing WebSocket protocol details. Thank you providing this valuable tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions