From 8837ec1e043e449672e3c9170ad1bef314143ac4 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Jun 2008 13:36:35 +0000 Subject: [PATCH] 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 --- gosa-core/include/class_gosaSupportDaemon.inc | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.30.2