Skip to content

Commit

Permalink
- client: check if IP is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKamalov committed Jan 27, 2021
1 parent 0c33058 commit ebe2678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ export const countClientsStatistics = (ids, autoClients) => {
const cidrsCount = Object.entries(autoClients)
.reduce((acc, curr) => {
const [id, count] = curr;
if (R_CLIENT_ID.test(id)) {
if (!ipaddr.isValid(id)) {
return false;
}
if (cidrs.some((cidr) => isIpInCidr(id, cidr))) {
Expand Down

0 comments on commit ebe2678

Please sign in to comment.