laravel-websockets
laravel-websockets copied to clipboard
server crash
I have found a bug in ratchet websocket server library that you are extending one of its php files. sending a post request with integer keys to the websocket server will crash it.
i think the best way to deal with it is to override onMessage function with its parent from ratchet library but change OverflowException to Throwable https://github.com/beyondcode/laravel-websockets/blob/605a7fa71ddabfffe381b079acc21403c7547ea2/src/Server/HttpServer.php#L8
actually this bug is from : 1- https://github.com/guzzle/psr7/blob/5c693242bede743c23402bc5b9de62da04a882d7/src/Message.php#L178 If a header with a numeric key is used, this code will fail. Which I reported here : https://github.com/guzzle/psr7/issues/497#issuecomment-1077576249 2- https://github.com/ratchetphp/Ratchet/blob/5012dc954541b40c5599d286fd40653f5716a38f/src/Ratchet/Http/HttpServer.php#L45 it seems the package is abandoned and there is no sign of any activity after 48 hours: https://github.com/ratchetphp/Ratchet/issues/955
Also this package is abandoned
Err no it's not
My bad ❤️, please review PRs
What PRs?

@GrahamCampbell from others, not from me