![]() |
Codeigniter + Dwoo - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Codeigniter + Dwoo (/showthread.php?tid=27769) |
Codeigniter + Dwoo - El Forum - 02-19-2010 [eluser]danielbertini[/eluser] Hello all, I am developing a system where customers can add their own pages, the parser CodeIgniter is very simple so I decided to use the Dwoo. All installed, configured and running but the .tpl allows customers to run php code and this can not happen in my project. Has anyone experienced this and have any idea why? In controller: Code: $this->load->library('Dwootemplate'); In view (.tpl): Code: <?php echo "daniel"; ?> // actually allow result: daniel var: test Regards, Daniel. Codeigniter + Dwoo - El Forum - 02-19-2010 [eluser]bretticus[/eluser] Are you calling this right? I have never used this, but I was curious and looking at the method call, it shows this code: Code: /** If this is the same lib you have, you should probably call TRUE on the 2nd param and just echo the result. Codeigniter + Dwoo - El Forum - 02-19-2010 [eluser]danielbertini[/eluser] My funtion is like: Code: public function display($sTemplate, $return = FALSE) { Codeigniter + Dwoo - El Forum - 02-19-2010 [eluser]bretticus[/eluser] Yep, looks the same (as you can see.) Just echo it out (do not allow CI to render.) Code: $this->load->library('Dwootemplate'); Codeigniter + Dwoo - El Forum - 02-19-2010 [eluser]danielbertini[/eluser] 'd just try it but the problem continues, it seems that Dwoo simply does not inherit this characteristic of smarty ... Codeigniter + Dwoo - El Forum - 02-19-2010 [eluser]bretticus[/eluser] In that case, I'd check what happens in Code: $template = $this->get($tpl, $this->dwoo_data); Perhaps there is a property you can set that prevents executing code (either via eval() or the template is included--not likely.) Codeigniter + Dwoo - El Forum - 02-20-2010 [eluser]Seldaek[/eluser] Dwoo will allow php to pass through it unless it has a "new Dwoo_Security_Policy()" assigned through $dwoo->setSecurityPolicy($policy). I don't know exactly the CI code you're using and from the code pasted here I can't tell exactly how to work this in, but I hope this will help you to get there.. By default the security policy will strip out all php code. |