Skip to content

Commit

Permalink
stop execution when unauthenticated, to prevent the page to show when…
Browse files Browse the repository at this point in the history
… canceling auth popup
  • Loading branch information
ceeram committed Mar 18, 2013
1 parent 7becd58 commit b28ea65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Controller/Component/Auth/BasicAuthenticate.php
Expand Up @@ -117,9 +117,9 @@ public function getUser(CakeRequest $request) {
* @return boolean True
*/
public function unauthenticated(CakeRequest $request, CakeResponse $response) {
$response->header($this->loginHeaders());
$response->statusCode(401);
$response->send();
$Exception = new UnauthorizedException();
$Exception->responseHeader($this->loginHeaders());
throw $Exception;
return true;
}

Expand Down

0 comments on commit b28ea65

Please sign in to comment.