ddnet / ddnet-web

Static part of DDNet's website: https://ddnet.org/
14 stars 33 forks source link

URI Redirection for running ddnet and connecting to servers via 'addr' attribute #275

Closed murpii closed 11 months ago

murpii commented 11 months ago

Given my lack of experience with HTML and JavaScript, I'm not certain if there are any potential exploits. The addr= attribute takes pretty much anything, not just IPs.

Motivation was Discords unwillingness to bring back custom URI protocols as clickable links.

Example: https://ddnet.org/connect-to/?addr=176.9.114.238:8340

furo321 commented 11 months ago

Doesn't work correctly for me in Firefox, the window will instantly close when "Allow this file to open the ddnet link with DDNet?" gets shown. (but it will work if I allow it to always open the link). Seems to only be an issue with Firefox, as it works with Chromium.

image

Also the popper.js include seems to be unused? Also there is already a static version of jquery at www/jquery.js.

murpii commented 11 months ago

Doesn't work correctly for me in Firefox, the window will instantly close when "Allow this file to open the ddnet link with DDNet?" gets shown. (but it will work if I allow it to always open the link). Seems to only be an issue with Firefox, as it works with Chromium.

Tested Firefox, Chrome and Edge, all of them worked for me, weird.

Also the popper.js include seems to be unused? Also there is already a static version of jquery at www/jquery.js.

Yes, I just copy pasted the libraries from getbootstrap's quick start. Removed it now.