Code

Updated DAK key import.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 13:36:35 +0000 (13:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 13:36:35 +0000 (13:36 +0000)
- Ensure that the given key-data is base64-encoded.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11383 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_gosaSupportDaemon.inc

index b86f277aea1903cfe7b94622000dcc58bfa0113d..8e5704293b90bd0de6ef08eaf0fe8eb8242649e0 100644 (file)
@@ -1898,6 +1898,11 @@ class gosaSupportDaemon
       $key = preg_replace("/^.*\n\n/sim","",$key);
       /* Remove footer */
       $key = preg_replace("/-----.*$/sim","",$key);
+    }elseif (!preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $key)) {
+      
+      /* Encode key if it is raw.
+       */
+      $key = base64_encode($key);
     }
 
     /* Create query