setting servername with an IPv6 request must ensure we have both brackets
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 13 Mar 2011 18:31:00 +0000 (18:31 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 13 Mar 2011 18:31:00 +0000 (18:31 +0000)
commitd73b3758701661729e001801d964736d18066fd9
treefa62c0c36fbfb5b76ad10a6b444c39ecc0639147
parent9509de315b022c809913ed0c6f4ddad282cad069
setting servername with an IPv6 request must ensure we have both brackets

On lighttpd 1.4.28, the SERVER_NAME CGI variable is truncated at the first
colon. This makes it return an incorrect value for SERVER_NAME when the user
make the request to an IPv6, it outputs something like [2001.

This patch make sure we have either both opening and closing brackets or no
brackets at all (hence the 'xor' boolean check).

+ipv6
includes/DefaultSettings.php