Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Security] Check post_only option and request method
  • Loading branch information
henrikbjorn committed Jun 9, 2012
1 parent b84b46b commit 6a01d3d
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -50,6 +50,18 @@ public function __construct(SecurityContextInterface $securityContext, Authentic
$this->csrfProvider = $csrfProvider;
}

/**
* @{inheritdoc}
*/
protected function requiresAuthentication(Request $request)
{
if ($this->options['post_only'] && !$request->isMethod('post')) {
return false;
}

return parent::requiresAuthentication($request);
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 6a01d3d

Please sign in to comment.