Skip to content

Commit 04aa2b8

Browse files
committed
fix: NO_PROXY should allow URIs with hyphens ("circleci-internal-outer-build-agent")
Signed-off-by: Marc Nuri <marc@marcnuri.com>
1 parent acf6d26 commit 04aa2b8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### 6.2-SNAPSHOT
44

55
#### Bugs
6+
fix #4373: NO_PROXY should allow URIs with hyphens ("circleci-internal-outer-build-agent")
67

78
#### Improvements
89

kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/HttpClientUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class HttpClientUtils {
5252
private static final String BACKWARDS_COMPATIBILITY_DISABLE_DEFAULT = "true";
5353
private static final Pattern IPV4_PATTERN = Pattern.compile(
5454
"(http://|https://)?(?<ipAddressOrSubnet>(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])(\\/[0-9]\\d|1[0-9]\\d|2[0-9]\\d|3[0-2]\\d)?)");
55-
private static final Pattern INVALID_HOST_PATTERN = Pattern.compile("[^\\da-zA-Z.-/:]+");
55+
private static final Pattern INVALID_HOST_PATTERN = Pattern.compile("[^\\da-zA-Z.\\-/:]+");
5656
private static final AtomicBoolean MULTIPLE_HTTP_CLIENT_WARNING_LOGGED = new AtomicBoolean();
5757

5858
private HttpClientUtils() {

kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/HttpClientUtilsTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ Stream<Arguments> masterUrlMatchesNoProxyInput() {
109109
arguments("http://192.168.1.100:6443", new String[] { "192.168.1.0/24" }),
110110
arguments("master.example.com", new String[] { "master.example.com" }),
111111
arguments("master.example.com", new String[] { ".example.com" }),
112-
arguments("master.example.com", new String[] { "one.com", "other.com", ".com" }),
112+
arguments("master.example.com",
113+
new String[] { "circleci-internal-outer-build-agent", "one.com", "other.com", ".com" }),
113114
arguments("192.168.1.110", new String[] { "192.168.1.110" }),
114115
arguments("192.168.1.110", new String[] { "http://192.168.1.110" }),
115116
arguments("192.168.1.110", new String[] { "https://192.168.1.110" }),
@@ -137,6 +138,7 @@ Stream<Arguments> masterUrlDoesNotMatchNoProxyInput() {
137138
arguments("master.example.com", new String[0]),
138139
arguments("master.example.com", new String[] { "master1.example.com" }),
139140
arguments("master.example.com", new String[] { ".example1.com" }),
141+
arguments("master.example.com", new String[] { "circleci-internal-outer-build-agent", }),
140142
arguments("master.example.com", new String[] { "one.com", "other.com", "master.example.", ".co" }),
141143
arguments("192.168.1.110", new String[] { "192.168.1.111" }),
142144
arguments("192.168.1.110", new String[] { "http://192.168.1.111" }),

0 commit comments

Comments
 (0)