diff --git a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php index 7e75ad858ee..208f97c0a4f 100644 --- a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php @@ -909,6 +909,30 @@ public function testValidateHasManyRecordsPass() { $this->assertTrue($result); } +/** + * Test that values like Foo.0.1 + * + * @return void + */ + public function testValidateNestedNumericSets() { + + $this->Controller->Security->startup($this->Controller); + $key = $this->Controller->request->params['_Token']['key']; + $unlocked = ''; + $hashFields = array('TaxonomyData'); + $fields = urlencode(Security::hash(serialize($hashFields) . $unlocked . Configure::read('Security.salt'))); + + $this->Controller->request->data = array( + 'TaxonomyData' => array( + 1 => array(array(2)), + 2 => array(array(3)) + ), + '_Token' => compact('key', 'fields', 'unlocked') + ); + $result = $this->Controller->Security->validatePost($this->Controller); + $this->assertTrue($result); + } + /** * testValidateHasManyRecords method *