Advanced: http://mooncakephp.wordpress.com/2009/11/06/續-security-component/
今天遇到了一個特別的 bug, 在一個 add 頁面, page load 沒有問題,
但submit 的時候卻白畫面, 有進過 controller 的 beforeFilter(),
但沒有進過controller 的 add.
答案是 Security compoent enable 了, 因為沒有使用$form->end()
令頁面沒有提交一組 hidden 的 hash code, CakePHP 以為是安全問題, beforeFilter 之後就 filter 了….
cookbook:
When using the Security Component you must use the FormHelper to create your forms. The Security Component looks for certain indicators that are created and managed by the FormHelper (especially those created in create() and end()).
