includes/sessions.php
changeset 471 7906fb190fc1
parent 466 1cc8a038ad20
child 472 bc4b58034f4d
--- a/includes/sessions.php	Sat Mar 01 19:01:07 2008 -0500
+++ b/includes/sessions.php	Sat Mar 01 23:02:05 2008 -0500
@@ -551,14 +551,22 @@
         die('No group info');
       }
     }
+    
+    // make sure we aren't banned
     $this->check_banlist();
     
+    // Printable page view? Probably the wrong place to control
+    // it but $template is pretty dumb, it will just about always
+    // do what you ask it to do, which isn't always what we want
     if ( isset ( $_GET['printable'] ) )
     {
       $this->theme = 'printable';
       $this->style = 'default';
     }
     
+    // setup theme ACLs
+    $template->process_theme_acls();
+    
     profiler_log('Sessions started');
   }
   
@@ -3209,6 +3217,23 @@
         }
         
         break;
+      case 'clean_key':
+        // Clean out a key, since it won't be used.
+        if ( !empty($req['key_aes']) )
+        {
+          $this->fetch_public_key($req['key_aes']);
+        }
+        if ( !empty($req['key_dh']) )
+        {
+          $pk = $db->escape($req['key_dh']);
+          $q = $db->sql_query('DELETE FROM ' . table_prefix . "diffiehellman WHERE public_key = '$pk';");
+          if ( !$q )
+            $db->die_json();
+        }
+        return array(
+            'mode' => 'noop'
+          );
+        break;
     }
     
   }