diff options
author | Brian Weaver <cmdrclueless@gmail.com> | 2015-04-16 16:20:57 -0400 |
---|---|---|
committer | Brian Weaver <cmdrclueless@gmail.com> | 2015-04-16 20:57:31 -0400 |
commit | c4a83b5454a3516b630b38cd8e8472f2166fc986 (patch) | |
tree | cb6ea4fed8e01d6652a2c19b2882f42f55e2c341 /actionpack/lib | |
parent | c8bab30ce5a7a40be7a3c7c4271e8ae6d2b303bb (diff) | |
download | rails-c4a83b5454a3516b630b38cd8e8472f2166fc986.tar.gz rails-c4a83b5454a3516b630b38cd8e8472f2166fc986.tar.bz2 rails-c4a83b5454a3516b630b38cd8e8472f2166fc986.zip |
Fix broken IPv6 addresses handling
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index f5b709ccd6..350ef147e0 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -5,7 +5,7 @@ module ActionDispatch module Http module URL IP_HOST_REGEXP = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ - HOST_REGEXP = /(^[^:]+:\/\/)?([^:]+)(?::(\d+$))?/ + HOST_REGEXP = /(^[^:]+:\/\/)?(\[[^\]]+\]|[^:]+)(?::(\d+$))?/ PROTOCOL_REGEXP = /^([^:]+)(:)?(\/\/)?$/ mattr_accessor :tld_length |