diff --git a/client/src/helpers/form.js b/client/src/helpers/form.js index 58d11ba8..1f0a339a 100644 --- a/client/src/helpers/form.js +++ b/client/src/helpers/form.js @@ -63,7 +63,7 @@ export const isPositive = (value) => { }; export const port = (value) => { - if (value && (value < 80 || value > 65535)) { + if ((value || value === 0) && (value < 80 || value > 65535)) { return form_error_port_range; } return false; diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index 2ac0afe9..eb7c7db2 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -195,7 +195,7 @@ export const redirectToCurrentProtocol = (values, httpPort = 80) => { if (protocol !== 'https:' && enabled && port_https) { checkRedirect(`https://${hostname}${httpsPort}/${hash}`); - } else if (protocol === 'https:' && enabled && port_https && port_https !== port) { + } else if (protocol === 'https:' && enabled && port_https && port_https !== parseInt(port, 10)) { checkRedirect(`https://${hostname}${httpsPort}/${hash}`); } else if (protocol === 'https:' && (!enabled || !port_https)) { window.location.replace(`http://${hostname}:${httpPort}/${hash}`);