From: coderkun Date: Sun, 14 May 2017 19:22:13 +0000 (+0200) Subject: Add IPv6 to “localhost” regex (#440) X-Git-Tag: v12.0.0beta3~13^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F4862%2Fhead;p=nextcloud-server.git Add IPv6 to “localhost” regex (#440) Signed-off-by: Oliver Hanraths --- diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index b39ae3e8c0c..09e18f74177 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -67,7 +67,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#'; const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#'; - const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)$/'; + const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|::1)$/'; /** * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_IOS instead