-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
-
None
When configuring an ip address filter with netmask it may not work as expected.
In our case we configured an ip address filter to allow specific IPs to access special URLs in our keycloak instances - but access was still denied.
We could nail down the issue to the undertow source code.
Maybe this could be solved by adding just one line to IPAddressAccessControlHandler.java:
private void addIpV4SlashPrefix(final String peer, final boolean deny) { String[] components = peer.split("\\/"); String[] parts = components[0].split("\\."); int maskLen = Integer.parseInt(components[1]); final int mask = Bits.intBitMask(32 - maskLen, 31); int prefix = 0; for (int i = 0; i < 4; ++i) { prefix <<= 8; String part = parts[i]; int no = Integer.parseInt(part); prefix |= no; } prefix &= mask; // <-- adding this line fixes the tests ipv4acl.add(new PrefixIpV4PeerMatch(deny, peer, mask, prefix)); }
- is incorporated by
-
WFCORE-6057 Upgrade Undertow to 2.3.0.Final (CVE-2022-2764)
- Closed
-
WFCORE-5946 Upgrade Undertow to 2.2.18.Final
- Closed