From: hickert Date: Thu, 19 Jun 2008 13:36:35 +0000 (+0000) Subject: Updated DAK key import. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8837ec1e043e449672e3c9170ad1bef314143ac4;p=gosa.git Updated DAK key import. - 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 --- diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index b86f277ae..8e5704293 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -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