diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index 0301785f4..f1517adee 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -524,7 +524,7 @@ class SecurityComponent extends Object { $field[$key] = array_merge($merge, $field[$key]); } } - sort($field); + ksort($field); $check = urlencode(Security::hash(serialize($field) . CAKE_SESSION_STRING)); if ($form !== $check) { diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index 3e7f69237..e05770b75 100644 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -257,7 +257,7 @@ class FormHelper extends AppHelper { } function secure($fields) { $append = '
'; - sort($fields); + ksort($fields); $append .= $this->hidden('_Token.fields', array('value' => urlencode(Security::hash(serialize($fields) . CAKE_SESSION_STRING)), 'id' => 'TokenFields' . mt_rand())); $append .= '
'; return $append;