Lukasz Lenart created WW-5805:
---------------------------------
Summary: Struts Boot: baseUrl() mishandles bracketed and long-form
IPv6 addresses
Key: WW-5805
URL: https://issues.apache.org/jira/browse/WW-5805
Project: Struts 2
Issue Type: Bug
Components: Core
Reporter: Lukasz Lenart
Fix For: 7.6.0
Follow-up to [WW-5791|https://issues.apache.org/jira/browse/WW-5791].
{{StrutsBootServer#urlHost()}} builds the host part of {{baseUrl()}} from
{{struts.boot.address}}:
* an address given already in brackets, e.g. {{[::1]}}, is bracketed again:
{{http://[[::1]]:8080}};
* the long form of the wildcard, {{0:0:0:0:0:0:0:0}}, is not recognised as "all
interfaces" (only {{0.0.0.0}} and {{::}} are), so the URL uses it as the host
instead of {{127.0.0.1}}.
Expected: normalise the address (strip brackets, detect any wildcard form via
{{InetAddress#isAnyLocalAddress}}) before building the URL, with tests for each
form.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)