summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aeb68bb)
raw | patch | inline | side by side (parent: aeb68bb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Mar 2007 08:10:27 +0000 (08:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Mar 2007 08:10:27 +0000 (08:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5918 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/include/sieve/class_sieveElement_Fileinto.inc b/include/sieve/class_sieveElement_Fileinto.inc
index 80b4c3aaca76049d5034fb0184119ffe933148d2..de30a9a1fb99ca7b75abcc61603c9f8a79b85cc3 100644 (file)
$mbs = $this->get_mail_boxes();
if(isset($_POST['fileinto_'.$this->object_id])){
- $mb = $_POST['fileinto_'.$this->object_id];
-
+ $mb = stripslashes($_POST['fileinto_'.$this->object_id]);
/* Depending on the user mode we only accept
* existing mailboxes
function execute()
{
$smarty = get_smarty();
- $smarty->assign("Selected",$this->data);
+ $smarty->assign("Selected",htmlentities($this->data));
$smarty->assign("Boxes", $this->get_mail_boxes());
$smarty->assign("User_Mode", $this->user_mode);
$smarty->assign("ID", $this->object_id);
diff --git a/include/sieve/class_sieveElement_Redirect.inc b/include/sieve/class_sieveElement_Redirect.inc
index 67bc934a1c4dacdb559d7ec6a2bebc425d52b719..4f19c67e87c7dbd1473a177e5ed6fe16e704a5df 100644 (file)
<?php
class sieve_redirect
{
- var $data = array();
+ var $data = "";
var $object_id = -1;
var $LastError ="";
if(isset($_POST['redirect_to_'.$this->object_id])){
$rt = stripslashes($_POST['redirect_to_'.$this->object_id]);
- $rt = "\"".trim(preg_replace("/\"/","",$rt))."\"";
+ $rt = trim($rt);
$this->data = $rt;
}
}
{
$msgs = array();
- if(!is_email(preg_replace("/\"/","",$this->data))){
+ if(!is_email($this->data)){
$msgs[] =_("Please specify a valid email address.");
}
$data = array('ELEMENTS' => array(array('class' => "quoted-string" ,"text" => _("Put a mail address here"))));
}
- foreach($data['ELEMENTS'] as $node ){
+ foreach($data['ELEMENTS'] as $key => $node ){
if(in_array($node['class'],array("quoted-string","text"))){
- $this->data = $node['text'];
+ $tmp = sieve_get_strings($data['ELEMENTS'],$key);
+ if(count($tmp['STRINGS'])){
+
+ foreach($tmp['STRINGS'] as $str){
+ $this->data.= $str;
+ }
+ }
}
}
}
function execute()
{
- $values = $this->data;
-
+ $values = htmlentities($this->data);
$smarty = get_smarty();
$smarty->assign("ID", $this->object_id);
$smarty->assign("Destinations" , $values);
diff --git a/include/sieve/templates/element_fileinto.tpl b/include/sieve/templates/element_fileinto.tpl
index 65db0481f89bb4d11bf229ca702ed61d10ff8e40..c6ae998e0ead75a17f1329261679a3f025e4a9a8 100644 (file)
<td>
{t}Folder{/t}
{if $User_Mode}
- <input class='sieve_fileinto_input' type='text' value='{$Selected}' name='fileinto_{$ID}'>
+ <input class='sieve_fileinto_input' type='text' value="{$Selected}" name='fileinto_{$ID}'>
{else}
<select name='fileinto_{$ID}' class='sieve_fileinto_input'>
{html_options values=$Boxes output=$Boxes selected=$Selected}