Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

Commit

Permalink
issue #1 - Colocado teste do empty no lugar mais adequado.
Browse files Browse the repository at this point in the history
  • Loading branch information
carloshenrq committed Aug 2, 2016
1 parent e05b82f commit 46b16ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Controller/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ public static function login(ServerRequestInterface $request, ResponseInterface
$return = ['stage' => 0, 'loginSuccess' => false, 'loginError' => false];

// Adicionado teste para recaptcha para segurança das requisições enviadas ao forms.
if(BRACP_RECAPTCHA_ENABLED && (empty($data['recaptcha']) || !self::getApp()->checkReCaptcha($data['recaptcha'])))
if(BRACP_RECAPTCHA_ENABLED && !self::getApp()->checkReCaptcha($data['recaptcha']))
{
$return['stage'] = 0;
$return['loginError'] = true;
Expand Down
2 changes: 1 addition & 1 deletion app/brACPApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function checkReCaptcha($response)
{
// Se a configuração estiver desabilitada para o captcha,
// não enviar requisição, apenas retornar false.
if(!BRACP_RECAPTCHA_ENABLED)
if(!BRACP_RECAPTCHA_ENABLED || empty($response))
return false;

// Realiza a requisição da key no servido reCaptcha do google
Expand Down

0 comments on commit 46b16ac

Please sign in to comment.