Skip to content

Commit

Permalink
Bump version, and apiServer update
Browse files Browse the repository at this point in the history
Found a reasonable bug in fluxport-controller state management, so
have bumped verison to pull that in. Small refactor to ipv4 adress
check
  • Loading branch information
David White committed Feb 5, 2024
1 parent 1f357e7 commit 19c1905
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions apiServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ let initialHash = hash(fs.readFileSync(path.join(__dirname, '/config/userconfig.

function validIpv4Address(ip) {
const ipv4Regex = /^(\d{1,3}\.){3}\d{1,3}$/;
if (ipv4Regex.test(ip)) {
const parts = ip.split('.');
// eslint-disable-next-line no-restricted-syntax
for (const part of parts) {
if (parseInt(part, 10) > 255) {
return false;
}
}

if (!ipv4Regex.test(ip)) return false;

const parts = ip.split('.');

const isValid = parts.every((part) => {
if (parseInt(part, 10) > 255) return false;
return true;
}
return false;
})

return isValid;
}

function validateTags() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"docs": "jsdoc -d docs --configure jsconf.json -r"
},
"dependencies": {
"@megachips/fluxport-controller": "^0.0.20",
"@megachips/fluxport-controller": "^0.1.0",
"@megachips/nat-upnp": "^1.1.1",
"apicache": "~1.6.3",
"archiver": "~6.0.1",
Expand Down

0 comments on commit 19c1905

Please sign in to comment.