From 3780da4ad1c6644b73390b950d180f81a970cc1d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 3 Feb 2012 10:29:37 -0600 Subject: [PATCH] add comment to boostrap. --- laravel/laravel.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/laravel/laravel.php b/laravel/laravel.php index 3a4941b0..0ba4f4d4 100644 --- a/laravel/laravel.php +++ b/laravel/laravel.php @@ -149,10 +149,10 @@ } /** - * Route the request to the proper route in the application. If a - * route is found, the route will be called via the request class - * static property. If no route is found, the 404 response will - * be returned to the browser. + * If the requset URI has too many segments, we will bomb out of + * the request. This is too avoid potential DDoS attacks against + * the framework by overloading the controller lookup method + * with thousands of segments. */ $uri = URI::current(); @@ -161,6 +161,12 @@ throw new \Exception("Invalid request. Too many URI segments."); } +/** + * Route the request to the proper route in the application. If a + * route is found, the route will be called via the request class + * static property. If no route is found, the 404 response will + * be returned to the browser. + */ Request::$route = Routing\Router::route(Request::method(), $uri); if (is_null(Request::$route))