From: Michael M Slusarz Date: Thu, 15 Jan 2009 05:09:14 +0000 (-0700) Subject: md5() -> hash() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=744398432f3dfebbe982718e85ebe671b2049084;p=horde.git md5() -> hash() --- diff --git a/folks/config/hooks.php.dist b/folks/config/hooks.php.dist index 517242274..f5f6d177f 100644 --- a/folks/config/hooks.php.dist +++ b/folks/config/hooks.php.dist @@ -329,7 +329,7 @@ // continue; // } // if ($field == 'password') { -// $value = md5($value); +// $value = hash('md5', $value); // } // $fields[] = 'user_' . String::lower($field); // $values[] = String::convertCharset($value, NLS::getCharset(), $conf['sql']['charset']); @@ -345,7 +345,7 @@ // } // // require_once $GLOBALS['registry']->get('fileroot', 'folks') . '/lib/Folks.php'; -// $code = Folks::encodeString($userID, 'activate' . md5($extra['password'])); +// $code = Folks::encodeString($userID, 'activate' . hash('md5', $extra['password'])); // $link = Util::addParameter(Horde::applicationUrl('account/approve.php', true, -1), // array('user' => $userID, 'code' => $code), // null, false); @@ -409,4 +409,4 @@ // $auth = &Auth::singleton('folks'); // return $auth->setAuth($_COOKIE['folks_login_user'], array('transparent' => 1, 'password' => null)); // } -// } \ No newline at end of file +// } diff --git a/folks/lib/Driver.php b/folks/lib/Driver.php index a712729f4..728b1cb43 100644 --- a/folks/lib/Driver.php +++ b/folks/lib/Driver.php @@ -88,7 +88,7 @@ class Folks_Driver { return $vfs; } - $p = md5($user); + $p = hash('md5', $user); $vfspath = Folks::VFS_PATH . '/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/'; $vfs_name = $p . '.' . $conf['images']['image_type']; @@ -134,7 +134,7 @@ class Folks_Driver { return $vfs; } - $p = md5($user); + $p = hash('md5', $user); $vfspath = Folks::VFS_PATH . '/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/'; $vfs_name = $p . '.' . $GLOBALS['conf']['images']['image_type']; @@ -457,7 +457,7 @@ class Folks_Driver { $user = Auth::getAuth(); } - $password = md5($password); + $password = hash('md5', $password); return $this->_saveProfile(array('user_password' => $password), $user); } @@ -624,7 +624,7 @@ class Folks_Driver { return false; } - return $encrypted == md5($plaintext); + return $encrypted == hash('md5', $plaintext); } /** @@ -814,4 +814,4 @@ class Folks_Driver { return $this->_deleteActivity($scope, $date, $user); } -} \ No newline at end of file +} diff --git a/folks/lib/Folks.php b/folks/lib/Folks.php index d31a14b3b..85c20f38e 100644 --- a/folks/lib/Folks.php +++ b/folks/lib/Folks.php @@ -64,7 +64,7 @@ class Folks { 'id' => $user), null, false); } else { - $p = md5($user); + $p = hash('md5', $user); return $GLOBALS['conf']['images']['direct'] . '/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/' . $view . '/' . $p . '.' . $GLOBALS['conf']['images']['image_type']; @@ -205,7 +205,7 @@ class Folks { */ static function encodeString($string, $key) { - $key = substr(md5($key), 0, 24); + $key = substr(hash('md5', $key), 0, 24); $iv_size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $string = mcrypt_ecb(MCRYPT_3DES, $key, $string, MCRYPT_ENCRYPT, $iv); @@ -302,4 +302,4 @@ class Folks { return $menu->render(); } } -} \ No newline at end of file +} diff --git a/folks/lib/Friends/shared.php b/folks/lib/Friends/shared.php index c58ad146c..7a2e41695 100644 --- a/folks/lib/Friends/shared.php +++ b/folks/lib/Friends/shared.php @@ -221,7 +221,7 @@ class Folks_Friends_shared extends Folks_Friends_sql { { $GLOBALS['folks_shares'] = Horde_Share::singleton('folks'); - $share = $GLOBALS['folks_shares']->newShare(md5(microtime())); + $share = $GLOBALS['folks_shares']->newShare(hash('md5', microtime())); if ($share instanceof PEAR_Error) { return $share; } @@ -234,4 +234,4 @@ class Folks_Friends_shared extends Folks_Friends_sql { return $GLOBALS['folks_shares']->addShare($share); } -} \ No newline at end of file +} diff --git a/framework/Form/lib/Horde/Form/VarRenderer/Xhtml.php b/framework/Form/lib/Horde/Form/VarRenderer/Xhtml.php index 9209cfaf7..ec3938dab 100644 --- a/framework/Form/lib/Horde/Form/VarRenderer/Xhtml.php +++ b/framework/Form/lib/Horde/Form/VarRenderer/Xhtml.php @@ -866,7 +866,7 @@ EOT; { $varname = $var->getVarName(); $varvalue = $vars->get($varname); - $fieldId = 'obrowser_' . md5(uniqid(rand(), true)); + $fieldId = 'obrowser_' . hash('md5', uniqid(rand(), true)); $html = ' -
+ diff --git a/kronolith/templates/search/event_summaries.inc b/kronolith/templates/search/event_summaries.inc index bd7df64c1..4a3737311 100644 --- a/kronolith/templates/search/event_summaries.inc +++ b/kronolith/templates/search/event_summaries.inc @@ -1,5 +1,5 @@ - + getLink() ?> getCategory()) ?> diff --git a/kronolith/themes/categoryCSS.php b/kronolith/themes/categoryCSS.php index a25468edb..b783f9183 100644 --- a/kronolith/themes/categoryCSS.php +++ b/kronolith/themes/categoryCSS.php @@ -27,7 +27,7 @@ foreach ($colors as $category => $color) { '.month-eventBox a, .week-eventBox a, .day-eventBox a, .block-eventBox a, .legend-eventBox a, ', '.month-eventBox a:hover, .week-eventBox a:hover, .day-eventBox a:hover, .block-eventBox a:hover, .legend-eventBox a:hover { '; } else { - $class = '.category' . md5($category); + $class = '.category' . hash('md5', $category); echo "$class, .linedRow td$class, $class a, $class a:hover { "; }