Closed selvamKrish closed 6 years ago
@francisbrosnan Any comment on this pull request?
Hello @selvamKrish Thanks for the patch and pointing the issue.
I've applied an updated version of the PR to avoid doing nopoll_log with application data received (which might cause memory problems, SEGFAULT, or even buffer memory problems with a carefully crafted application data that takes advantage of the fact that the payload will be processed by vprintf C API).
Latest commit here: https://github.com/ASPLes/nopoll/commit/4350ec4745ed475e333e84f9e7b1e1a2f77b796e
Best Regards.
Ping with payload is not handled in Nopoll
As per https://tools.ietf.org/html/rfc6455#section-5.5.2 and https://tools.ietf.org/html/rfc6455#section-5.5.3, A ping frame may include payload/application data and the websocket library (nopoll) should respond with Pong frame with the same payload as the response.
Currently in nopoll here https://github.com/ASPLes/nopoll/blob/master/src/nopoll_conn.c#L3448, Ping frame is handled only when the payload size is 0.
This changes may support the above feature to respond pong frame with ping payload.
Review these changes and Please, let me know if it has any review comments or requires any other changes/modification.