Validator.isHostName() rejects IPv6 addresses

Description

With IPv6 addressing localhost is resolved as 0:0:0:0:0:0:0:1 so it should be fine to access my local portal as http://[0:0:0:0:0:0:0:1]:8080 (this is translated as http://[::1]:8080) but I get HTTP Status 500 as ValidHostNameFilter throws:

The root cause is that ValidHostNameFilter uses Validator.isHostName(serverName) and isHostName validates hostnames that contains only digits, characters, dash or period but not colon nor open and close bracket.

Activity

Show:

Matthew Lee August 17, 2012 at 1:22 PM

Committed on:
Portal 6.1.x CE GIT ID: ae7a93ebbd685ff71c9745895fdd4c4ee63989b9.
Portal 6.2.x GIT ID: 68b4cfb4368cc34915f9defeebac4380552bf506.

Fixed

Details

Assignee

Reporter

Branch Version/s

6.1.x
6.0.x

Backported to Branch

Committed

Fix Priority

3

Git Pull Request

Components

Priority

Zendesk Support

Created July 11, 2012 at 1:58 AM
Updated June 24, 2023 at 3:49 PM
Resolved July 11, 2012 at 11:38 AM
Loading...