diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-11-13 11:15:47 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-18 12:36:03 +0100 |
commit | d0a30b0e55799e8f5348ee558346d6ebf32cedda (patch) | |
tree | a5e9d1f4980f66b7e8923f08a870b663c921f5aa /tests | |
parent | 230e517f3506624091d19194ce17d43c3f105c88 (diff) | |
download | nextcloud-server-d0a30b0e55799e8f5348ee558346d6ebf32cedda.tar.gz nextcloud-server-d0a30b0e55799e8f5348ee558346d6ebf32cedda.zip |
Ignore port for trusted domains
This lead to a lot of confusion in the past and did not really offer any value. Let's remove the port check therefore. (it's anyways not really a part of the domain)
Fixes https://github.com/owncloud/core/issues/12150 and https://github.com/owncloud/core/issues/12123 and also a problem reported by @DeepDiver1975.
Conflicts:
lib/private/request.php
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/request.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/lib/request.php b/tests/lib/request.php index b89bf92ece7..2760377fa48 100644 --- a/tests/lib/request.php +++ b/tests/lib/request.php @@ -240,7 +240,7 @@ class Test_Request extends PHPUnit_Framework_TestCase { } public function trustedDomainDataProvider() { - $trustedHostTestList = array('host.one.test:8080', 'host.two.test:8080'); + $trustedHostTestList = array('host.one.test', 'host.two.test', '[1fff:0:a88:85a3::ac1f]'); return array( // empty defaults to true array(null, 'host.one.test:8080', true), @@ -249,8 +249,12 @@ class Test_Request extends PHPUnit_Framework_TestCase { // trust list when defined array($trustedHostTestList, 'host.two.test:8080', true), - array($trustedHostTestList, 'host.two.test:9999', false), + array($trustedHostTestList, 'host.two.test:9999', true), array($trustedHostTestList, 'host.three.test:8080', false), + array($trustedHostTestList, 'host.two.test:8080:aa:222', false), + array($trustedHostTestList, '[1fff:0:a88:85a3::ac1f]', true), + array($trustedHostTestList, '[1fff:0:a88:85a3::ac1f]:801', true), + array($trustedHostTestList, '[1fff:0:a88:85a3::ac1f]:801:34', false), // trust localhost regardless of trust list array($trustedHostTestList, 'localhost', true), |