Skip to content

Commit

Permalink
Stricter string comparisons.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark authored and ADmad committed May 4, 2014
1 parent 4aea949 commit 4fd6656
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Component/AuthComponent.php
Expand Up @@ -682,7 +682,7 @@ public function redirectUrl($url = null) {
$redir = $this->Session->read('Auth.redirect');
$this->Session->delete('Auth.redirect');

if (Router::normalize($redir) == Router::normalize($this->_config['loginAction'])) {
if (Router::normalize($redir) === Router::normalize($this->_config['loginAction'])) {
$redir = $this->_config['loginRedirect'];
}
} elseif ($this->_config['loginRedirect']) {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Component/RequestHandlerComponent.php
Expand Up @@ -426,7 +426,7 @@ public function requestedWith($type = null) {
return $this->response->mapType($contentType);
}
if (is_string($type)) {
return ($type == $this->response->mapType($contentType));
return ($type === $this->response->mapType($contentType));
}
}

Expand Down

0 comments on commit 4fd6656

Please sign in to comment.