Skip to content

Ensure DNS records are only requested for IP allowlist when needed #18244

@fkmotion

Description

@fkmotion

Expected Behavior

No DNS Request for network entries just for hostnames in login_whitelist_ip/login_allowlist_ip

Current Behavior

All entries in login_whitelist_ip/login_allowlist_ip for networks that was specified with an "/" are attempted to be resolved using DNS.
For Example:
We have "192.168.50.0/24" in our login_whitelist_ip/login_allowlist_ip. Now our DNS Server recivies a ton of request (around 175000 per day) trying to resolve a IP for hostname "192.168.50.0/24" and "192.168.50.0/24.ourdomain.com"

login_whitelist_ip/login_allowlist_ip still is working as expected.
We have this issue since our update to matomo 4.5.0

Possible Solution

Don't try to resolve a DNS Name for a network.

Steps to Reproduce (for Bugs)

  1. Enter a "/x" Network into login_whitelist_ip or login_allowlist_ip like "192.168.50.0/24"
  2. Check all DNS Request send by Matomo

Context

Your Environment

  • Matomo Version: 4.5.0
  • PHP Version: 7.4
  • Server Operating System: Ubuntu 20.04.3 LTS

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.RegressionIndicates a feature used to work in a certain way but it no longer does even though it should.c: PerformanceFor when we could improve the performance / speed of Matomo.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions