Welcome Guest, Not a member yet? Register   Sign In
New more Secure Auto Routing
#1

(This post was last modified: 04-12-2022, 01:40 AM by kenjis.)

Since the current auto routing is a security risk, the default would be changed to disabled in v4.2.0.
See https://forum.codeigniter.com/showthread...#pid395045
We don't recommend to use it.

But auto routing is a convenient feature that eliminates the need to define each route, making it easier to develop.

So I would like to introduce optional New more Secure Auto Routing:
  • A controller method needs HTTP verb prefix like `getIndex()`, `postCreate()`.
    • Developers always know HTTP method, so requests by unexpected HTTP method does not happen.
  • The Default Controller (`home` by default) and the Default Method (`index` by default) must be omitted in the URI.
    • Restrict one-to-one correspondence between controller methods and URIs.
    • By default, you can access `/`, but `/home` and `/home/index` are 404.
  • It checks method parameter count.
    • If there are more parameters in the URI than the method parameters, it results in 404.
  • It does not support `_remap()` method.
    • Restrict one-to-one correspondence between controller methods and URIs.
  • Can't access controllers in Defined Routes.
    • Completely separates controllers accessible via Auto Routes from those accessible via Defined Routes.
Reply


Messages In This Thread
New more Secure Auto Routing - by kenjis - 04-11-2022, 10:24 PM
RE: New more Secure Auto Routing - by InsiteFX - 04-12-2022, 12:14 AM
RE: New more Secure Auto Routing - by ignitedcms - 04-12-2022, 01:38 AM
RE: New more Secure Auto Routing - by kenjis - 05-07-2022, 05:58 AM
RE: New more Secure Auto Routing - by InsiteFX - 05-08-2022, 01:27 AM
RE: New more Secure Auto Routing - by sneakyimp - 02-08-2023, 06:32 PM
RE: New more Secure Auto Routing - by kenjis - 02-08-2023, 06:50 PM
RE: New more Secure Auto Routing - by kenjis - 02-08-2023, 08:57 PM
RE: New more Secure Auto Routing - by sneakyimp - 02-20-2023, 04:49 PM
RE: New more Secure Auto Routing - by kenjis - 02-20-2023, 05:24 PM
RE: New more Secure Auto Routing - by kenjis - 02-20-2023, 05:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB