You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4911ed5
Browse filesBrowse the repository at this point in the historyBrowse files
Fred Park
committed
GH-1319: [JDBC] Match hostnameOverride endpoints on host and port
Only apply hostnameOverride to endpoint locations on the same host and
port as the connection, so endpoints on other ports are verified against
their own hostname. Ignore IPv6 brackets when comparing hosts, since a
host set through properties may not have them.
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/ArrowFlightSqlClientHandler.java
+18-6Lines changed: 18 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -861,25 +861,37 @@ public Builder withHostnameOverride(@Nullable final String hostnameOverride) {
861
861
862
862
/**
863
863
* Gets the hostname override to use when connecting to an endpoint location. The override is
864
-
* only valid for the host it was configured for, so endpoints on any other host are verified
865
-
* against their own hostname. Like the override itself, it is ignored when the original
866
-
* connection does not use encryption.
864
+
* only valid for the host and port it was configured for, so endpoints at any other location
865
+
* are verified against their own hostname. Like the override itself, it is ignored when the
866
+
* original connection does not use encryption.
867
867
*
868
868
* @param endpointUri the endpoint location.
869
-
* @return the hostname override if the endpoint is on the original host, otherwise null.
869
+
* @return the hostname override if the endpoint is on the original host and port, otherwise
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/ConnectionTlsHostnameOverrideTest.java
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/client/ArrowFlightSqlClientHandlerBuilderTest.java
+33-6Lines changed: 33 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -170,22 +170,32 @@ public void testHostnameOverrideForEndpointOnSameHost() {
0 commit comments