@@ -611,11 +611,13 @@ public function secure($fields = array(), $secureAttributes = array()) {
611
611
$ tokenFields = array_merge ($ secureAttributes , array (
612
612
'value ' => urlencode ($ fields . ': ' . $ locked ),
613
613
'id ' => 'TokenFields ' . mt_rand (),
614
+ 'secure ' => static ::SECURE_SKIP ,
614
615
));
615
616
$ out = $ this ->hidden ('_Token.fields ' , $ tokenFields );
616
617
$ tokenUnlocked = array_merge ($ secureAttributes , array (
617
618
'value ' => urlencode ($ unlocked ),
618
619
'id ' => 'TokenUnlocked ' . mt_rand (),
620
+ 'secure ' => static ::SECURE_SKIP ,
619
621
));
620
622
$ out .= $ this ->hidden ('_Token.unlocked ' , $ tokenUnlocked );
621
623
return $ this ->Html ->useTag ('hiddenblock ' , $ out );
@@ -1868,6 +1870,7 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
1868
1870
unset($ options ['target ' ]);
1869
1871
}
1870
1872
1873
+ $ previousLastAction = $ this ->_lastAction ;
1871
1874
$ this ->_lastAction ($ url );
1872
1875
1873
1876
$ out = $ this ->Html ->useTag ('form ' , $ formUrl , $ formOptions );
@@ -1890,6 +1893,8 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
1890
1893
if ($ options ['block ' ]) {
1891
1894
$ this ->_View ->append ($ options ['block ' ], $ out );
1892
1895
$ out = '' ;
1896
+ // Reset security-relevant fields for outer form
1897
+ $ this ->_lastAction = $ previousLastAction ;
1893
1898
}
1894
1899
unset($ options ['block ' ]);
1895
1900
0 commit comments