fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17018] helpdesk: filter filenames for illegal char


From: sigurdne
Subject: [Fmsystem-commits] [17018] helpdesk: filter filenames for illegal char
Date: Thu, 31 Aug 2017 07:35:57 -0400 (EDT)

Revision: 17018
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17018
Author:   sigurdne
Date:     2017-08-31 07:35:57 -0400 (Thu, 31 Aug 2017)
Log Message:
-----------
helpdesk: filter filenames for illegal char

Modified Paths:
--------------
    trunk/helpdesk/inc/class.uitts.inc.php
    trunk/phpgwapi/inc/class.historylog.inc.php

Modified: trunk/helpdesk/inc/class.uitts.inc.php
===================================================================
--- trunk/helpdesk/inc/class.uitts.inc.php      2017-08-31 11:03:58 UTC (rev 
17017)
+++ trunk/helpdesk/inc/class.uitts.inc.php      2017-08-31 11:35:57 UTC (rev 
17018)
@@ -1065,7 +1065,7 @@
                                $file = '/tmp/' . uniqid() . '.png';
                                if (file_put_contents($file, $data))
                                {
-                                       $to_file = 
"{$bofiles->fakebase}/{$id}/" .  str_replace(' ', '_', $_ticket['subject']) . 
'_' . ( (int)count($_ticket['files']) +1 ) . '.png';
+                                       $to_file = 
"{$bofiles->fakebase}/{$id}/" .  str_replace(array(' ', '/', '?'), array('_', 
'_', ''), $_ticket['subject']) . '_' . ( (int)count($_ticket['files']) +1 ) . 
'.png';
                                        $bofiles->create_document_dir("{$id}");
                                        $bofiles->vfs->override_acl = 1;
 
@@ -1280,7 +1280,7 @@
                                                $file = '/tmp/' . uniqid() . 
'.png';
                                                if (file_put_contents($file, 
$data))
                                                {
-                                                       $to_file = 
"{$bofiles->fakebase}/{$receipt['id']}/" .  str_replace(' ', '_', 
$values['subject']) . '.png';
+                                                       $to_file = 
"{$bofiles->fakebase}/{$receipt['id']}/" .  str_replace(array(' ', '/', '?'), 
array('_', '_', ''), $values['subject']) . '.png';
                                                        
$bofiles->create_document_dir("{$receipt['id']}");
                                                        
$bofiles->vfs->override_acl = 1;
 

Modified: trunk/phpgwapi/inc/class.historylog.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.historylog.inc.php 2017-08-31 11:03:58 UTC (rev 
17017)
+++ trunk/phpgwapi/inc/class.historylog.inc.php 2017-08-31 11:35:57 UTC (rev 
17018)
@@ -46,7 +46,7 @@
                                . "location_id=" . $this->location_id 
,__LINE__,__FILE__);
                }
 
-               function add($status,$record_id,$new_value,$old_value)
+               function add($status,$record_id,$new_value,$old_value = '')
                {
                        if ($new_value != $old_value)
                        {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]