includes/sessions.php
changeset 542 5841df0ab575
parent 541 acb7e23b6ffa
child 554 e87390b1f9b0
equal deleted inserted replaced
541:acb7e23b6ffa 542:5841df0ab575
  1137     }
  1137     }
  1138     else
  1138     else
  1139     {
  1139     {
  1140       // Stash it in a cookie
  1140       // Stash it in a cookie
  1141       // For now, make the cookie last forever, we can change this in 1.1.x
  1141       // For now, make the cookie last forever, we can change this in 1.1.x
  1142       setcookie( 'sid', $session_key, time()+315360000, scriptPath.'/', null, ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ) );
  1142       setcookie( 'sid', $session_key, time()+15552000, scriptPath.'/', null, ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ) );
  1143       $_COOKIE['sid'] = $session_key;
  1143       $_COOKIE['sid'] = $session_key;
  1144     }
  1144     }
  1145     // $keyhash is stored in the database, this is for compatibility with the older DB structure
  1145     // $keyhash is stored in the database, this is for compatibility with the older DB structure
  1146     $keyhash = md5($session_key);
  1146     $keyhash = md5($session_key);
  1147     // Record the user's IP
  1147     // Record the user's IP
  3221             var frm = document.forms.'.$form_name.';
  3221             var frm = document.forms.'.$form_name.';
  3222             var use_diffiehellman = false;' . "\n";
  3222             var use_diffiehellman = false;' . "\n";
  3223     if ( $dh_supported && $dh_pubkey )
  3223     if ( $dh_supported && $dh_pubkey )
  3224     {
  3224     {
  3225       $code .= <<<EOF
  3225       $code .= <<<EOF
  3226             if ( frm.$dh_supported.value == 'true' )
  3226             if ( frm.$dh_supported.value == 'true' && !is_iPhone )
  3227               use_diffiehellman = true;
  3227               use_diffiehellman = true;
  3228 EOF;
  3228 EOF;
  3229     }
  3229     }
  3230     $code .= '
  3230     $code .= '
  3231     
  3231