summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc60299)
raw | patch | inline | side by side (parent: bc60299)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 31 Mar 2008 09:04:26 +0000 (09:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 31 Mar 2008 09:04:26 +0000 (09:04 +0000) |
-Entries with \ or / can now be downloaded.
-\ and / will no longer be stripped out.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10075 594d385d-05f5-0310-b6e9-bd551577e9d8
-\ and / will no longer be stripped out.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10075 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiHook.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc
index c0aeae24fe43a4b8ff9d1600d6c2c0e2b6fc3fa4..2cc27da2def71af7f2f0eaaa057c2a461704af9d 100644 (file)
/* File download requested */
if(isset($_GET['getFAIHook'])){
- if(isset($this->SubObjects[$_GET['getFAIHook']])){
- $obj = $this->SubObjects[$_GET['getFAIHook']];
+ if(isset($this->SubObjects[base64_decode($_GET['getFAIHook'])])){
+ $obj = $this->SubObjects[base64_decode($_GET['getFAIHook'])];
$obj = $this->get_object_attributes($obj,$this->sub_Load_Later);
send_binary_content($obj['FAIscript'],$obj['cn'].".FAIhook");
}
/* Edit entries via GET */
if(isset($_GET['act']) && isset($_GET['id'])){
- if($_GET['act'] == "edit" && isset($this->SubObjects[$_GET['id']])){
- $obj = $this->SubObjects[$_GET['id']];
+ if($_GET['act'] == "edit" && isset($this->SubObjects[base64_decode($_GET['id'])])){
+ $obj = $this->SubObjects[base64_decode($_GET['id'])];
if($obj['status'] == "FreshLoaded"){
$obj = $this->get_object_attributes($obj,$this->sub_Load_Later);
}
if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new") || !preg_match("/r/",$s_acl)){
$down = "";
}else{
- $down = "<a href='?plug=".$_GET['plug']."&getFAIHook=".$key."'>
+ $down = "<a href='?plug=".$_GET['plug']."&getFAIHook=".base64_encode($key)."'>
<img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0>
</a>";
}
$s_acl = $this->ui->get_permissions($dn,"fai/faiHookEntry","cn") ;
if(preg_match("/r/",$s_acl)){
- $edit_link = "<a href='?plug=".$_GET['plug']."&act=edit&id=".$key."'>".$name['name']."</a>";
+ $edit_link = "<a href='?plug=".$_GET['plug']."&act=edit&id=".base64_encode($key)."'>".$name['name']."</a>";
$divlist->AddEntry(array( array("string"=>$edit_link),
array("string"=>$down , "attach" => "style='width:20px;'"),
array("string"=>str_replace("%s",base64_encode($key),$act),
$a_return=array();
foreach($this->SubObjects as $obj){
if($obj['status'] != "delete"){
+
+ $cn = stripslashes($obj['cn']);
+ $desc = "";
+
+ if((isset($obj['description']))&&(!empty($obj['description']))){
+ $desc = " [".stripslashes($obj['description'])."]";
+ }
+
if($use_dns){
- if((isset($obj['description']))&&(!empty($obj['description']))){
- $a_return[$obj['cn']]['name']= $obj['cn']." [".stripslashes($obj['description'])."]";
- }else{
- $a_return[$obj['cn']]['name']= $obj['cn'];
- }
+ $a_return[$obj['cn']]['name']= $cn.$desc;
$a_return[$obj['cn']]['dn']= $obj['dn'];
}else{
- if((isset($obj['description']))&&(!empty($obj['description']))){
- $a_return[$obj['cn']]= $obj['cn']." [".stripslashes($obj['description'])."]";
- }else{
- $a_return[$obj['cn']]= $obj['cn'];
- }
+ $a_return[$obj['cn']] = $cn.$desc;
}
}
}