You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Dmitriy Fingerman (Jira)" <ji...@apache.org> on 2025/04/04 14:17:00 UTC

[jira] [Work started] (HIVE-28782) Avoid unsafe splits on URIs that might contain IPv6 literals

     [ https://issues.apache.org/jira/browse/HIVE-28782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on HIVE-28782 started by Dmitriy Fingerman.
------------------------------------------------
> Avoid unsafe splits on URIs that might contain IPv6 literals
> ------------------------------------------------------------
>
>                 Key: HIVE-28782
>                 URL: https://issues.apache.org/jira/browse/HIVE-28782
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Dmitriy Fingerman
>            Assignee: Dmitriy Fingerman
>            Priority: Major
>              Labels: pull-request-available
>
> Hive has code locations where it splits a URI on the first ":" assuming that it delimits a host from a port.
> This is unsafe in a dual-stack or IPv6-only world. 
>  * HS2ActivePassiveHARegistry.updateEndpoint
>  * ZooKeeperHiveClientHelper.updateParamsWithZKServerNode
> Example:
> {code:java}
> final String[] tokens = instanceUri.split(":");
> final String hostname = tokens[0];
> final int port = Integer.parseInt(tokens[1]);{code}
> Similar issue in Hadoop:
> https://issues.apache.org/jira/browse/HADOOP-12122



--
This message was sent by Atlassian Jira
(v8.20.10#820010)