Index: branches/unlabeled/unlabeled-1.64.2/kernel/units/users/users_event_handler.php =================================================================== diff -u -r6140 -r6237 --- branches/unlabeled/unlabeled-1.64.2/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6140) +++ branches/unlabeled/unlabeled-1.64.2/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6237) @@ -121,7 +121,9 @@ if ($this->Application->IsAdmin() && ($login_value == 'root')) { // logging in "root" (admin only) $root_password = $this->Application->ConfigValue('RootPass'); - if ($root_password != md5($password)) { + $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); + $test = $password_formatter->EncryptPassword($password, 'b38'); + if ($root_password != $test) { $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); $event->status = erFAIL; return false; Index: branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/inportal_upgrade_v1.3.0.sql =================================================================== diff -u --- branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/inportal_upgrade_v1.3.0.sql (revision 0) +++ branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/inportal_upgrade_v1.3.0.sql (revision 6237) @@ -0,0 +1,3 @@ +UPDATE ConfigurationValues SET VariableValue = MD5(CONCAT(VariableValue, 'b38')) WHERE VariableName = 'RootPass'; + +UPDATE Modules SET Version = '1.3.0' WHERE Name = 'In-Portal'; \ No newline at end of file Index: branches/unlabeled/unlabeled-1.64.2/core/units/users/users_event_handler.php =================================================================== diff -u -r6140 -r6237 --- branches/unlabeled/unlabeled-1.64.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6140) +++ branches/unlabeled/unlabeled-1.64.2/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 6237) @@ -121,7 +121,9 @@ if ($this->Application->IsAdmin() && ($login_value == 'root')) { // logging in "root" (admin only) $root_password = $this->Application->ConfigValue('RootPass'); - if ($root_password != md5($password)) { + $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); + $test = $password_formatter->EncryptPassword($password, 'b38'); + if ($root_password != $test) { $object->SetError('ValidateLogin', 'invalid_password', 'lu_invalid_password'); $event->status = erFAIL; return false; Index: branches/unlabeled/unlabeled-1.44.2/admin/install/install_lib.php =================================================================== diff -u -r6132 -r6237 --- branches/unlabeled/unlabeled-1.44.2/admin/install/install_lib.php (.../install_lib.php) (revision 6132) +++ branches/unlabeled/unlabeled-1.44.2/admin/install/install_lib.php (.../install_lib.php) (revision 6237) @@ -925,8 +925,7 @@ $lang_path = FULL_PATH.'/'.$module_name.'/admin/install/langpacks'; $lang_xml->Parse($lang_path.'/english.lang', '|0|1|2|', ''); - $app->Redirect('', Array('pass' => 'all', 'admin' => 1, 'Refresh' => 1), '', 'modules/mod_status.php'); - + $app->Redirect('modules/modules_list', Array('pass' => 'all', 'admin' => 1, 'Refresh' => 1), 'admin'); } /** Index: branches/unlabeled/unlabeled-1.16.2/kernel/units/configuration/configuration_event_handler.php =================================================================== diff -u -r6106 -r6237 --- branches/unlabeled/unlabeled-1.16.2/kernel/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 6106) +++ branches/unlabeled/unlabeled-1.16.2/kernel/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 6237) @@ -49,7 +49,8 @@ $field_options['skip_empty'] = 1; $object->SetFieldOptions('VariableValue', $field_options); }else { - $object->SetDBField('VariableValue', md5($object->GetDBField('VariableValue'))); + $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); + $object->SetDBField('VariableValue', $password_formatter->EncryptPassword($object->GetDBField('VariableValue'), 'b38')); } } @@ -171,7 +172,7 @@ $event->redirect_params = Array('opener' => 's', 'pass'=>'all,conf'); //stay! $event->redirect = false; }*/ - + /** * Process items from selector (selected_ids var, key - prefix, value - comma separated ids) * Index: branches/unlabeled/unlabeled-1.107.2/admin/install.php =================================================================== diff -u -r6096 -r6237 --- branches/unlabeled/unlabeled-1.107.2/admin/install.php (.../install.php) (revision 6096) +++ branches/unlabeled/unlabeled-1.107.2/admin/install.php (.../install.php) (revision 6237) @@ -382,8 +382,14 @@ { $RootPass = $rs->fields["VariableValue"]; - if(strlen($RootPass)>0) - $LoggedIn = ($RootPass==md5($_POST["UserPass"])); + if(strlen($RootPass)>0) { + if (ConvertVersion($g_InPortal) >= ConvertVersion("1.2.1")) { + $LoggedIn = ($RootPass==md5(md5($_POST["UserPass"]).'b38')); + } + else { + $LoggedIn = ($RootPass==md5($_POST["UserPass"])); + } + } } else { $login_err_mesg = 'Invalid username or password'; @@ -1361,7 +1367,7 @@ } else { - $pass = md5($pass); + $pass = md5(md5($pass).'b38'); $sql = ' UPDATE '.$g_TablePrefix.'ConfigurationValues SET VariableValue = '.$ado->qstr($pass).' WHERE VariableName = "RootPass";'; Index: branches/unlabeled/unlabeled-1.16.2/core/units/configuration/configuration_event_handler.php =================================================================== diff -u -r6106 -r6237 --- branches/unlabeled/unlabeled-1.16.2/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 6106) +++ branches/unlabeled/unlabeled-1.16.2/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 6237) @@ -49,7 +49,8 @@ $field_options['skip_empty'] = 1; $object->SetFieldOptions('VariableValue', $field_options); }else { - $object->SetDBField('VariableValue', md5($object->GetDBField('VariableValue'))); + $password_formatter =& $this->Application->recallObject('kPasswordFormatter'); + $object->SetDBField('VariableValue', $password_formatter->EncryptPassword($object->GetDBField('VariableValue'), 'b38')); } } @@ -171,7 +172,7 @@ $event->redirect_params = Array('opener' => 's', 'pass'=>'all,conf'); //stay! $event->redirect = false; }*/ - + /** * Process items from selector (selected_ids var, key - prefix, value - comma separated ids) * Index: branches/unlabeled/unlabeled-1.1.2/core/kernel/utility/formatters/password_formatter.php =================================================================== diff -u -r4950 -r6237 --- branches/unlabeled/unlabeled-1.1.2/core/kernel/utility/formatters/password_formatter.php (.../password_formatter.php) (revision 4950) +++ branches/unlabeled/unlabeled-1.1.2/core/kernel/utility/formatters/password_formatter.php (.../password_formatter.php) (revision 6237) @@ -90,8 +90,8 @@ return $this->EncryptPassword($value); } - function EncryptPassword($value) + function EncryptPassword($value, $salt) { - return md5($value); + return md5(md5($value).$salt); } } \ No newline at end of file