mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding test for #GH424
This commit is contained in:
parent
ad304e0b43
commit
1693478889
1 changed files with 24 additions and 0 deletions
|
@ -909,6 +909,30 @@ class SecurityComponentTest extends CakeTestCase {
|
|||
$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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue