Browse Source

Stricter string comparisons.

euromark 12 years ago
parent
commit
4fd6656ea8

+ 1 - 1
src/Controller/Component/AuthComponent.php

@@ -682,7 +682,7 @@ class AuthComponent extends Component {
 			$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']) {

+ 1 - 1
src/Controller/Component/RequestHandlerComponent.php

@@ -426,7 +426,7 @@ class RequestHandlerComponent extends Component {
 			return $this->response->mapType($contentType);
 		}
 		if (is_string($type)) {
-			return ($type == $this->response->mapType($contentType));
+			return ($type === $this->response->mapType($contentType));
 		}
 	}