Refactoring input class to use Request::spoofed when hydrating input.

This commit is contained in:
Taylor Otwell 2011-07-08 12:41:03 -07:00
parent 5bb5adcf9c
commit 5bea9121af
1 changed files with 1 additions and 3 deletions

View File

@ -103,9 +103,7 @@ public static function hydrate()
case 'PUT':
case 'DELETE':
// The request method can be spoofed by specifying a "REQUEST_METHOD" in the $_POST array.
// If the method is being spoofed, the $_POST array will be considered the input.
if (isset($_POST['REQUEST_METHOD']) and in_array($_POST['REQUEST_METHOD'], array('PUT', 'DELETE')))
if (Request::spoofed())
{
static::$input =& $_POST;
}