Browse Source

Correct pattern matching.

Instead of 10 digits, it should limit at 10 groups.

Refs 1988e89e7382ba830c0172f399887595714c5b18
mark_story 11 years ago
parent
commit
b3dfad614a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/Cake/Controller/Component/SecurityComponent.php

+ 2 - 2
lib/Cake/Controller/Component/SecurityComponent.php

@@ -470,8 +470,8 @@ class SecurityComponent extends Component {
 		$multi = array();
 
 		foreach ($fieldList as $i => $key) {
-			if (preg_match('/(\.\d{1,10})+$/', $key)) {
-				$multi[$i] = preg_replace('/(\.\d{1,10})+$/', '', $key);
+			if (preg_match('/(\.\d+){1,10}$/', $key)) {
+				$multi[$i] = preg_replace('/(\.\d+){1,10}$/', '', $key);
 				unset($fieldList[$i]);
 			}
 		}