diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-05-12 01:42:25 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-05-12 01:42:25 +0200 |
commit | 2054837d017390604e9ac64ce6e7feedbea53a1c (patch) | |
tree | 09640bd77add39a8fd2ce42f3a87e5757122d632 /tests | |
parent | 984b509c0b3477dcb09e1871ac55137b7a00efc0 (diff) | |
parent | fd5b2d11d6a174f46df563917060e350f6df079a (diff) | |
download | nextcloud-server-2054837d017390604e9ac64ce6e7feedbea53a1c.tar.gz nextcloud-server-2054837d017390604e9ac64ce6e7feedbea53a1c.zip |
Merge pull request #8541 from owncloud/hardenIsSubDirectory
Harden issubdirectory()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/helper.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/lib/helper.php b/tests/lib/helper.php index 5663df7c9ae..59db30a73f6 100644 --- a/tests/lib/helper.php +++ b/tests/lib/helper.php @@ -120,15 +120,15 @@ class Test_Helper extends PHPUnit_Framework_TestCase { $this->assertEquals($result, $expected); } - function testIssubdirectory() { - $result = OC_Helper::issubdirectory("./data/", "/anotherDirectory/"); + function testIsSubDirectory() { + $result = OC_Helper::isSubDirectory("./data/", "/anotherDirectory/"); $this->assertFalse($result); - $result = OC_Helper::issubdirectory("./data/", "./data/"); + $result = OC_Helper::isSubDirectory("./data/", "./data/"); $this->assertTrue($result); mkdir("data/TestSubdirectory", 0777); - $result = OC_Helper::issubdirectory("data/TestSubdirectory/", "data"); + $result = OC_Helper::isSubDirectory("data/TestSubdirectory/", "data"); rmdir("data/TestSubdirectory"); $this->assertTrue($result); } |