StarfallEx icon indicating copy to clipboard operation
StarfallEx copied to clipboard

Can't connect to some websockets

Open anormaltwig opened this issue 2 years ago • 4 comments

Example:

-- Doesn't connect
local ws = WebSocket("www.yourworldoftext.com/ws/", nil, true)
ws:connect()

Port should get inserted right after .com but I can't do that because its forced to be at the end https://github.com/thegrb93/StarfallEx/blob/05c4aecd5347ecee8f86f9c7d11f9ac58551fbe6/lua/starfall/libs_cl/websocket.lua#L34

anormaltwig avatar Aug 08 '22 20:08 anormaltwig

addr should be renamed to 'domain' and there should be a param added for the directory/extension

thegrb93 avatar Aug 08 '22 21:08 thegrb93

Or we should just allow the user to format it, and we just sanitize it.

thegrb93 avatar Aug 08 '22 21:08 thegrb93

Doesn't the string.JavascriptSafe pretty much prevent any way to do anything malicious already?

anormaltwig avatar Aug 08 '22 21:08 anormaltwig

I don't think it protects completely against html injection, but it's only runnable on the owner of the chip anyway

thegrb93 avatar Aug 08 '22 21:08 thegrb93