X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_gosaSupportDaemon.inc;h=1f0ace96d53023ff967279645cc5fa577357232e;hb=0a8eb52048cd81d884b8e3f63613dc70e444fc27;hp=5101e905a1abf5c567972b1df5d6e987ab0a970a;hpb=be544c6b24fb2d0ae005ce38e44d1a0f7a869e0a;p=gosa.git diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 5101e905a..1f0ace96d 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -84,6 +84,16 @@ class gosaSupportDaemon return($this->is_connected); } + + /*! \brief Returns TRUE whether we are connected or not + @return BOOLEAN Returns TRUE when connected else FALSE + */ + public function is_connected() + { + return($this->is_connected); + } + + /*! \brief Disconnect from gosa daemon. */ @@ -827,6 +837,13 @@ class gosaSupportDaemon } if ($xml_elem['type'] == 'complete') { + $start_level = 1; + $test2 = &$params; + while($start_level < $xml_elem['level']) { + $test2 = &$test2[$level[$start_level]]; + $start_level++; + } + /* Save tag attributes too. e.g. */ @@ -836,12 +853,6 @@ class gosaSupportDaemon } } - $start_level = 1; - $test2 = &$params; - while($start_level < $xml_elem['level']) { - $test2 = &$test2[$level[$start_level]]; - $start_level++; - } if(!isset($test2[$xml_elem['tag']])){ if(isset($xml_elem['value'])){ $test2[$xml_elem['tag']] = $xml_elem['value']; @@ -1898,6 +1909,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 @@ -1933,7 +1949,7 @@ class gosaSupportDaemon $xml_msg = "
gosa_remove_dak_key
".$server." - ".$key." + ".$key." GOSA
";