From a1aa67476e22ae2cc4468c77926c665bea7495d3 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 11 Apr 2018 11:42:33 +0200 Subject: [PATCH] Test to make sure 4-byte utf8 supplementary chars get cleaned up --- mail/tests/SaveToVfsTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mail/tests/SaveToVfsTest.php b/mail/tests/SaveToVfsTest.php index 13390cb37b..3013346817 100644 --- a/mail/tests/SaveToVfsTest.php +++ b/mail/tests/SaveToVfsTest.php @@ -66,6 +66,7 @@ class SaveToVfsTest extends \EGroupware\Api\AppTest $this->assertNotContains('/', $cleaned); $this->assertNotContains('?', $cleaned); $this->assertNotContains('\x0b', $cleaned); + $this->assertNotContains('😂', $cleaned); // Length should stay the same $this->assertEquals(strlen($filename), strlen($cleaned), 'Length changed'); @@ -96,7 +97,8 @@ class SaveToVfsTest extends \EGroupware\Api\AppTest array('Contains a ?', true), array('Contains a %', true), array('Contains a \x0b', true), - array('This one contains them all < > " : | \ * / ? % are not allowed', true) + array('Contains a 😂', true), + array('This one contains them all < > " : | \ * / ? % 😂 are not allowed', true) ); } }