Welcome Guest, Not a member yet? Register   Sign In
Prevent arbitrary URL parameters
#1

(This post was last modified: 05-09-2020, 05:26 AM by akinuri.)

I know that there's a one-to-one relationship between the URL and the controller class/method as said inĀ URI Routing. Also that any parameters that's passed to the URL (e.g. site/gate/login/foo, foo being the parameter), will be passed to the method (URI segments). Is there a way to prevent this?

If I have this gate/login controller, I do not want gate/login/foo to work. It should return 404. How do I force this? Do I need a manual check inside the login method? Do I need to set an explicit route? If so this doesn't seem to work, unless I'm missing some special syntax. How do I deal with this?

I'm using CI 3.1.11
Reply


Messages In This Thread
Prevent arbitrary URL parameters - by akinuri - 05-09-2020, 05:24 AM
RE: Prevent arbitrary URL parameters - by akinuri - 05-09-2020, 08:07 AM
RE: Prevent arbitrary URL parameters - by akinuri - 05-09-2020, 09:04 AM
RE: Prevent arbitrary URL parameters - by akinuri - 05-09-2020, 10:19 AM
RE: Prevent arbitrary URL parameters - by akinuri - 05-11-2020, 07:10 AM
RE: Prevent arbitrary URL parameters - by akinuri - 05-12-2020, 03:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB