lnbits/bitcoinswitch

Extracting deviceid from URL does not check for seperator

Closed this issue · 3 comments

The deviceis and WebSocket host are extracted from the WebSocket URL by means of a substring and a fixed number of characters without checking for a seperator. When a deviceId has another length, this immediatly breaks creating the WebSocket connection.

Best way to resolve this is to verify the existence of the seperator and then do a substring using that data.

Created pull request

Nevermind

dni commented

i think this still needs some work, but can this issue be closed?