Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
dea6e34
Initial commit with empyt gradle library project
Oct 31, 2024
b864e00
Importing code from pervious PRs and starting a scaffolding for the n…
Oct 31, 2024
f4872ca
First implementation of an SSRF hardened RestTemplate
Nov 6, 2024
43540c7
First version of the README created
Nov 6, 2024
b890b82
Initial, minor updates (#1)
rstoyanchev Nov 20, 2024
48c35ab
TODOs resolved: logging added and cannonical hostname resolution impl…
Nov 20, 2024
b5ef00d
first iteration for build and release actions added
Nov 25, 2024
5be871e
adding support for system property based default
Nov 25, 2024
46fd49c
fix github actions, use Java 17 for building
Dec 2, 2024
1dfd233
Complete API refactor, a builder is used to create the RestTemplate, …
Dec 3, 2024
3d16fb9
Code cleanup; readme updated, ProtectionMode enum namig fixed, builde…
Dec 5, 2024
c0d33d5
Report only mode handling moved to SsrfDnsResolver to make user provi…
Dec 5, 2024
803268c
Adding Jetty client
Jan 17, 2025
6e25d59
UsageExample updated, RestClient example added
Jan 22, 2025
466e2c5
Code cleanup and documentation
Feb 5, 2025
a340c5c
Documentation added and minor cleanups regarding class visibility
Feb 11, 2025
ac5b927
Minor fixes based on review feedback, string formatting, IPV6 filtering
Feb 14, 2025
5bf2f93
Adding Netty client
KJ202 Feb 18, 2025
c9566b3
Revert "Adding Netty client"
KJ202 Feb 18, 2025
407164a
Adding Netty client
KJ202 Feb 18, 2025
7a25cb7
Netty client; uncomment invocations in UsageExample.java
Feb 19, 2025
3ee2b3c
Merge pull request #3 from KJ202/nettyClient
KJ202 Feb 19, 2025
969dc4a
Adapter refactor (#4)
vasporig Feb 19, 2025
4b4cb84
Adding a simpler customization to Hc5ClientAdapter to configure Clien…
Mar 24, 2025
870d66f
Fix a bug in the apache client adapter which disabled the usage of ou…
KJ202 Apr 24, 2025
9f1ab82
Fix bug: Make sure that a customConnectionManager can be used
KJ202 Apr 24, 2025
e76c7ff
Merge pull request #8 from KJ202/fix-bug-apache-connManager
KJ202 Apr 25, 2025
02523ab
Draft of restructuring (#5)
rstoyanchev Jun 4, 2025
1433ee3
Feature/hostname allowlist (#9)
KJ202 Jun 13, 2025
ce3cabe
Refactor: Overhaul core architecture and simplify client integration …
KJ202 Jul 18, 2025
40fa2fe
Fix 2 Netty tests
KJ202 Jul 18, 2025
f39a453
Candidate for Spring Security (#14)
rstoyanchev Jan 13, 2026
c2d6809
Backporting test for Netty and Apache resolvers (#15)
KJ202 Jan 16, 2026
49de988
Remove DNS filtering components and related tests (#17)
KJ202 Jan 16, 2026
abc075c
Add more tests and Javadoc for `InetAddressFilter.Builder` (#18)
rstoyanchev Jan 22, 2026
13703d8
use spring security
rwinch Jan 31, 2026
59254ca
Merge Add InetAddressMatcher
rwinch Feb 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2004-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.security.web.util.matcher;

import java.net.InetAddress;

import org.jspecify.annotations.Nullable;

/**
* Matches an {@link InetAddress}.
*
* @author Rossen Stoyanchev
* @author Rob Winch
* @since 7.1
*/
@FunctionalInterface
public interface InetAddressMatcher {

/**
* Whether the given address matches.
* @param address the {@link InetAddress} to check
* @return {@code true} if the address matches, {@code false} otherwise
*/
boolean matches(InetAddress address);

/**
* Whether the given address string matches.
* @param address the IP address string to check (may be {@code null})
* @return {@code true} if the address matches, {@code false} otherwise or if
* {@code null}
* @since 7.1
*/
default boolean matches(@Nullable String address) {
return (address != null) ? matches(InetAddressParser.parseAddress(address)) : false;
}

}
Loading
Loading