includes/sessions.php
changeset 471 7906fb190fc1
parent 466 1cc8a038ad20
child 472 bc4b58034f4d
equal deleted inserted replaced
470:a044ad834691 471:7906fb190fc1
   549       else
   549       else
   550       {
   550       {
   551         die('No group info');
   551         die('No group info');
   552       }
   552       }
   553     }
   553     }
       
   554     
       
   555     // make sure we aren't banned
   554     $this->check_banlist();
   556     $this->check_banlist();
   555     
   557     
       
   558     // Printable page view? Probably the wrong place to control
       
   559     // it but $template is pretty dumb, it will just about always
       
   560     // do what you ask it to do, which isn't always what we want
   556     if ( isset ( $_GET['printable'] ) )
   561     if ( isset ( $_GET['printable'] ) )
   557     {
   562     {
   558       $this->theme = 'printable';
   563       $this->theme = 'printable';
   559       $this->style = 'default';
   564       $this->style = 'default';
   560     }
   565     }
       
   566     
       
   567     // setup theme ACLs
       
   568     $template->process_theme_acls();
   561     
   569     
   562     profiler_log('Sessions started');
   570     profiler_log('Sessions started');
   563   }
   571   }
   564   
   572   
   565   # Logins
   573   # Logins
  3207               'respawn_info' => $this->process_login_request(array('mode' => 'getkey'))
  3215               'respawn_info' => $this->process_login_request(array('mode' => 'getkey'))
  3208             );
  3216             );
  3209         }
  3217         }
  3210         
  3218         
  3211         break;
  3219         break;
       
  3220       case 'clean_key':
       
  3221         // Clean out a key, since it won't be used.
       
  3222         if ( !empty($req['key_aes']) )
       
  3223         {
       
  3224           $this->fetch_public_key($req['key_aes']);
       
  3225         }
       
  3226         if ( !empty($req['key_dh']) )
       
  3227         {
       
  3228           $pk = $db->escape($req['key_dh']);
       
  3229           $q = $db->sql_query('DELETE FROM ' . table_prefix . "diffiehellman WHERE public_key = '$pk';");
       
  3230           if ( !$q )
       
  3231             $db->die_json();
       
  3232         }
       
  3233         return array(
       
  3234             'mode' => 'noop'
       
  3235           );
       
  3236         break;
  3212     }
  3237     }
  3213     
  3238     
  3214   }
  3239   }
  3215   
  3240   
  3216 }
  3241 }