Code

Updated setup to use xmlentities
[gosa.git] / gosa-core / setup / class_setupStep_Ldap.inc
index 9b5f670eafdfbaf412ef674874fdbb70b750eff5..855a4a8d35800ea1e97314b7fd440a36360087a4 100644 (file)
@@ -60,7 +60,7 @@ class Step_Ldap extends setup_step
   {
     $smarty = get_smarty();
     foreach($this->attributes as $attr){
-      $smarty->assign($attr,$this->$attr);
+      $smarty->assign($attr,xmlentities($this->$attr));
     }
 
     /* Assign connection status */
@@ -84,7 +84,7 @@ class Step_Ldap extends setup_step
 
     $base_to_append = $this->base;
     if(strlen($base_to_append) > 20){
-      $base_to_append = substr($base_to_append,0,17)."...";
+      $base_to_append = xmlentities(substr($base_to_append,0,17)."...");
     }
     $smarty->assign("base_to_append",$base_to_append);
     return($smarty -> fetch (get_template_path("../setup/setup_ldap.tpl")));
@@ -102,17 +102,17 @@ class Step_Ldap extends setup_step
     $this->bind_id = @ldap_bind($this->connect_id, $this->admin, $this->password);
     
     if(!$this->bind_id){
-      $str = sprintf(_("Anonymous bind failed on server '%s'."),$this->connection); 
+      $str = sprintf(_("Anonymous bind to server '%s' failed!"),$this->connection); 
       if(!empty($this->admin)){
-        $str = sprintf(_("Bind as user '%s' failed on server '%s'."),$this->admin,$this->connection);
+        $str = sprintf(_("Bind as user '%s' failed!"),$this->admin,$this->connection);
       }      
       return("<font color='red'>".$str."</font>");
     }else{
       if(empty($this->admin)){
-        $str = sprintf(_("Anonymous bind on server '%s' succeeded."), $this->connection);
-        return("<font color='blue'>".$str."</font> <font color='red'>"._("Please specify user and password.")."</font>");
+        $str = sprintf(_("Anonymous bind to server '%s' succeeded."), $this->connection);
+        return("<font color='blue'>".$str."</font> <font color='red'>"._("Please specify user and password!")."</font>");
       }else{
-        $str = sprintf(_("Bind as user '%s' on server '%s' succeeded."),$this->admin,$this->connection);
+        $str = sprintf(_("Bind as user '%s' to server '%s' succeeded!"),$this->admin,$this->connection);
         return("<font color='green'>".$str."</font>");
       }      
     }