Skip to content

Commit

Permalink
fix server ip/hostname validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sequal32 committed Oct 11, 2020
1 parent d99bc35 commit 0bf975c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ document.getElementById("main-form").onsubmit = function(e) {
if (on_client) {
let data = {type: "connect", port: parseInt(port_input.value)}

Validate(server_input, validip || validhostname || validip6)
Validate(server_input, validip || validhostname)

if (!validname || !validport) {return}
if (!validname || !validport || (!validip && !validhostname)) {return}
// Match hostname or ip
if (validhostname) {
data["hostname"] = server_input.value
Expand Down

0 comments on commit 0bf975c

Please sign in to comment.