[jboss-jira] [JBoss JIRA] (ELY-1040) Elytron, incorrect IPv6 address resolution
Darran Lofthouse (JIRA)
issues at jboss.org
Tue Apr 11 06:51:00 EDT 2017
[ https://issues.jboss.org/browse/ELY-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darran Lofthouse updated ELY-1040:
----------------------------------
Fix Version/s: 1.1.0.Beta35
> Elytron, incorrect IPv6 address resolution
> -------------------------------------------
>
> Key: ELY-1040
> URL: https://issues.jboss.org/browse/ELY-1040
> Project: WildFly Elytron
> Issue Type: Bug
> Reporter: Martin Choma
> Assignee: Darran Lofthouse
> Priority: Critical
> Fix For: 1.1.0.Beta35
>
>
> There is code in Elytron
> {code:java|title=SetMechanismInformationMechanismFactory.java}
> @Override
> public void evaluateRequest(HttpServerRequest request) throws HttpAuthenticationException {
> String host = request.getFirstRequestHeaderValue(HOST);
> String resolvedHostName = null;
> if (host != null) {
> if (host.startsWith("[")) {
> int close = host.indexOf(']');
> if (close > 0) {
> resolvedHostName = host.substring(0, close);
> }
> }
> {code}
> I assume intention of this code is to get from e.g. "[::1]:8080" just "[::1]", but now it gets only "[::1". To achieve this my assumption, there should be rather
> {code}
> resolvedHostName = host.substring(0, close + 1);
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list