From: <gem...@li...> - 2011-11-14 15:42:22
|
Revision: 212 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=212&view=rev Author: mennodekker Date: 2011-11-14 15:42:16 +0000 (Mon, 14 Nov 2011) Log Message: ----------- Fixing some flaws in #31: remember last organization restored, nologin selected more efficient and bypassing security by checking through gems_user_user Modified Paths: -------------- trunk/library/classes/Gems/User/NoLoginDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserLoader.php Modified: trunk/library/classes/Gems/User/NoLoginDefinition.php =================================================================== --- trunk/library/classes/Gems/User/NoLoginDefinition.php 2011-11-14 13:01:31 UTC (rev 211) +++ trunk/library/classes/Gems/User/NoLoginDefinition.php 2011-11-14 15:42:16 UTC (rev 212) @@ -71,7 +71,7 @@ return array( 'user_active' => false, 'user_role' => 'nologin', - 'user_organization_id' => 0, + //'user_organization_id' => 0, //REMOVED AS IT BREAKS STORING LAST ORGANIZATION ); } } Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2011-11-14 13:01:31 UTC (rev 211) +++ trunk/library/classes/Gems/User/User.php 2011-11-14 15:42:16 UTC (rev 212) @@ -200,7 +200,7 @@ */ public function checkPassword($password) { - return $this->definition->checkPassword($this->getLoginName(), $this->getOrganizationId(), $password); + return $this->userLoader->checkPassword($this->getLoginName(), $this->getOrganizationId(), $password); } /** Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2011-11-14 13:01:31 UTC (rev 211) +++ trunk/library/classes/Gems/User/UserLoader.php 2011-11-14 15:42:16 UTC (rev 212) @@ -262,6 +262,7 @@ */ protected function getUserClassName($login_name, $organization) { + if (is_null($login_name) && is_null($organization)) return 'NoLoginDefinition'; if ($this->isProjectUser($login_name)) { return 'ProjectUserDefinition'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |