#487: Fix cacert access from IE
[platal.git] / modules / platal.php
index 9949ccc..7d72369 100644 (file)
@@ -39,7 +39,7 @@ class PlatalModule extends PLModule
     {
         return array(
             'index'       => $this->make_hook('index',     AUTH_PUBLIC),
-            'cacert.pem'  => $this->make_hook('cacert',    AUTH_PUBLIC),
+           'cacert.pem'  => $this->make_hook('cacert',    AUTH_PUBLIC),
             'changelog'   => $this->make_hook('changelog', AUTH_PUBLIC),
 
             // Preferences thingies
@@ -55,6 +55,7 @@ class PlatalModule extends PLModule
             'password/smtp' => $this->make_hook('smtppass',  AUTH_MDP),
             'recovery'      => $this->make_hook('recovery',  AUTH_PUBLIC),
             'exit'          => $this->make_hook('exit', AUTH_PUBLIC),
+            'deconnexion.php' => $this->make_hook('exit', AUTH_PUBLIC),
 
             // happenings related thingies
             'rss'         => $this->make_hook('rss',       AUTH_PUBLIC),
@@ -70,9 +71,13 @@ class PlatalModule extends PLModule
 
     function handler_cacert(&$page)
     {
-        $data = file_get_contents('/etc/ssl/xorgCA/cacert.pem');
-        header('Content-Type: application/x-x509-ca-cert');
-        header('Content-Length: '.strlen($data));
+        $data = file_get_contents("/etc/ssl/xorgCA/cacert.pem","r");
+        header("Pragma:");
+       header("Set-Cookie:");
+       header("Cache-Control:");
+       header("Expires:");
+       header("Content-Type: application/x-x509-ca-cert");
+        header("Content-Length: ".strlen($data));
         echo $data;
         exit;
     }