Welcome Guest, Not a member yet? Register   Sign In
How do I prevent direct controller function access?
#5

[eluser]PhilTem[/eluser]
I'm not sure I understand "cannot access the function through my scripts…like my forms or even ajax" correctly, but only external access to your functions is prohibited, not internal access (as long as you don't use the public-declaration in the method header Wink )

But sure, for AJAXing it's not possible to access these methods since these requests will be routed through index.php as well and that checks for underscores. However, if you restrict access with routes.php, even AJAX requests won't be able to access it since it's prohibited.
Thus, the only plausible way would be to use some filtering in MY_Controller::__construct() to check for allowed/disallowed requests Wink


Messages In This Thread
How do I prevent direct controller function access? - by El Forum - 12-20-2012, 10:16 PM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 04:15 AM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 06:18 AM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 06:21 AM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 07:54 AM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 08:08 AM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 08:59 PM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 09:23 PM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 09:51 PM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 09:57 PM
How do I prevent direct controller function access? - by El Forum - 12-21-2012, 10:02 PM
How do I prevent direct controller function access? - by El Forum - 12-22-2012, 01:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB