Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
09d1c85e
Commit
09d1c85e
authored
Dec 30, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limited number of uri segments that a request can have.
parent
d10aa7b2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
changelog.md
changelog.md
+8
-0
router.php
laravel/routing/router.php
+9
-0
index.php
public/index.php
+1
-1
No files found.
changelog.md
View file @
09d1c85e
# Laravel Change Log
# Laravel Change Log
## Version 2.0.8
-
Fix: Limited URI segments to 20 to protect against DDoS.
### Upgrading from 2.0.7
-
Replace
**laravel**
directory.
## Version 2.0.7
## Version 2.0.7
-
Fix: Fixed raw_where in query builder.
-
Fix: Fixed raw_where in query builder.
...
...
laravel/routing/router.php
View file @
09d1c85e
...
@@ -181,6 +181,15 @@ class Router {
...
@@ -181,6 +181,15 @@ class Router {
$segments
=
explode
(
'/'
,
trim
(
$uri
,
'/'
));
$segments
=
explode
(
'/'
,
trim
(
$uri
,
'/'
));
// If there are more than 20 request segments, we will halt the request
// and throw an exception. This is primarily to protect against DDoS
// attacks which could overwhelm the server by feeding it too many
// segments in the URI, causing the loops in this class to bog.
if
(
count
(
$segments
)
>
20
)
{
throw
new
\Exception
(
"Invalid request. There are more than 20 URI segments."
);
}
if
(
!
is_null
(
$key
=
$this
->
controller_key
(
$segments
)))
if
(
!
is_null
(
$key
=
$this
->
controller_key
(
$segments
)))
{
{
// Extract the various parts of the controller call from the URI.
// Extract the various parts of the controller call from the URI.
...
...
public/index.php
View file @
09d1c85e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Laravel - A PHP Framework For Web Artisans
* Laravel - A PHP Framework For Web Artisans
*
*
* @package Laravel
* @package Laravel
* @version 2.0.
7
* @version 2.0.
8
* @author Taylor Otwell <taylorotwell@gmail.com>
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
* @link http://laravel.com
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment