Multiple Checkboxes and CakePHP3 CSRF Security Component

I’ve spent a bit of time over the last few months learning Cake 3 (currently RC-2). I’ve been having a heck of a time with the CSRF Component barking at me that my requests have been black holed. If you’ve used the CSRF at all you’ve no doubt received something like this:

The request has been black-holed Error: The requested address ‘/controller/action/1’ was not found on this server.

Well I finally figured it out. When dealing with multiple checkboxes to submit an array over HTTP POST, you will want to use the unlockField feature. The component clearly has problems with creating a hash from multiple checkbox elements with the same name. Here’s some example code to get you out of the black hole.