diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-10 13:08:22 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-12 10:47:47 +0100 |
commit | 80ef53eff09886efcbe983c1db383fc5290b2048 (patch) | |
tree | c74b64d3f350704a452dfb70031792c2fd392fb5 /tests | |
parent | 5054b8e4aa5dce43fa8aeeb89728450ecbac1342 (diff) | |
download | nextcloud-server-80ef53eff09886efcbe983c1db383fc5290b2048.tar.gz nextcloud-server-80ef53eff09886efcbe983c1db383fc5290b2048.zip |
verify the file name length not to exceed 255 characters + verify path during rename
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/pathverificationtest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/files/pathverificationtest.php b/tests/lib/files/pathverificationtest.php index 1a802a48f57..5d38c6291a6 100644 --- a/tests/lib/files/pathverificationtest.php +++ b/tests/lib/files/pathverificationtest.php @@ -23,6 +23,16 @@ class PathVerification extends \Test\TestCase { } /** + * @expectedException \OCP\Files\InvalidPathException + * @expectedExceptionMessage File name is too long + */ + public function testPathVerificationFileNameTooLong() { + $fileName = str_repeat('a', 500); + $this->view->verifyPath('', $fileName); + } + + + /** * @dataProvider providesEmptyFiles * @expectedException \OCP\Files\InvalidPathException * @expectedExceptionMessage Empty filename is not allowed |