# HG changeset patch # User Dan # Date 1226201759 18000 # Node ID b64f2618ef25ec805695d4f7d13d4b580da08123 # Parent af6a618e5c94a5c14be2dcf7ff2b31fe459a9c3e Fixed DiffieHellman being included twice when not supported and login fails diff -r af6a618e5c94 -r b64f2618ef25 includes/sessions.php --- a/includes/sessions.php Sat Nov 08 22:35:05 2008 -0500 +++ b/includes/sessions.php Sat Nov 08 22:35:59 2008 -0500 @@ -3400,22 +3400,25 @@ * @return array LoginAPI response */ - function process_login_request($req) + function process_login_request($req, $_dbgtmp = false) { global $db, $session, $paths, $template, $plugins; // Common objects // Setup EnanoMath and Diffie-Hellman - require_once(ENANO_ROOT.'/includes/math.php'); - global $dh_supported; - $dh_supported = true; - try + if ( !function_exists('dh_gen_private') ) { - require_once(ENANO_ROOT . '/includes/diffiehellman.php'); - } - catch ( Exception $e ) - { - $dh_supported = false; + require_once(ENANO_ROOT.'/includes/math.php'); + + $dh_supported = true; + try + { + require_once(ENANO_ROOT . '/includes/diffiehellman.php'); + } + catch ( Exception $e ) + { + $dh_supported = false; + } } global $_math;