Browse Source

Fix locked issues

Alejandro Ibarra 10 years ago
parent
commit
e5ad7ff946
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/Controller/Component/SecurityComponent.php

+ 5 - 1
src/Controller/Component/SecurityComponent.php

@@ -345,7 +345,11 @@ class SecurityComponent extends Component
             throw new SecurityException(sprintf($message, '_Token.debug'));
         }
 
-        return $check['_Token']['fields'];
+        $token = urldecode($check['_Token']['fields']);
+        if (strpos($token, ':')) {
+            list($token, $locked) = explode(':', $token, 2);
+        }
+        return $token;
     }
 
     /**