Commit 42f641b2fdfcc73371bbd8634c15801a155fb3fb

Authored by Conrad Vermeulen
1 parent de44c93c

WSA-127

"Upload fails because of issue with the comparison of upload paths (SUP-787)"
Fixed.

Committed By: Conrad Vermeulen
Reviewed By: Philip Arkoll

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8562 c91229c3-7414-0410-bfa2-8a42b809f60b
ktwebservice/KTUploadManager.inc.php
... ... @@ -10,31 +10,31 @@
10 10 * Document Management Made Simple
11 11 * Copyright (C) 2008 KnowledgeTree Inc.
12 12 * Portions copyright The Jam Warehouse Software (Pty) Limited
13   - *
  13 + *
14 14 * This program is free software; you can redistribute it and/or modify it under
15 15 * the terms of the GNU General Public License version 3 as published by the
16 16 * Free Software Foundation.
17   - *
  17 + *
18 18 * This program is distributed in the hope that it will be useful, but WITHOUT
19 19 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 20 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 21 * details.
22   - *
  22 + *
23 23 * You should have received a copy of the GNU General Public License
24 24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25   - *
26   - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
  25 + *
  26 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
27 27 * California 94120-7775, or email info@knowledgetree.com.
28   - *
  28 + *
29 29 * The interactive user interfaces in modified source and object code versions
30 30 * of this program must display Appropriate Legal Notices, as required under
31 31 * Section 5 of the GNU General Public License version 3.
32   - *
  32 + *
33 33 * In accordance with Section 7(b) of the GNU General Public License version 3,
34 34 * these Appropriate Legal Notices must retain the display of the "Powered by
35   - * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  35 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
36 36 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
37   - * must display the words "Powered by KnowledgeTree" and retain the original
  37 + * must display the words "Powered by KnowledgeTree" and retain the original
38 38 * copyright notice.
39 39 * Contributor( s): ______________________________________
40 40 *
... ... @@ -54,7 +54,7 @@ class KTUploadManager
54 54  
55 55 $this->age = $config->get('webservice/uploadExpiry',60);
56 56 $this->temp_dir = $config->get('webservice/uploadDirectory');
57   - $this->temp_dir = str_replace('\\','/', $this->temp_dir);
  57 + $this->temp_dir = strtolower(str_replace('\\','/', $this->temp_dir));
58 58 }
59 59  
60 60 /**
... ... @@ -79,7 +79,7 @@ class KTUploadManager
79 79 function is_valid_temporary_file($tempfilename)
80 80 {
81 81 $tempdir = substr($tempfilename,0,strlen($this->temp_dir));
82   - $tempdir = str_replace('\\','/', $tempdir);
  82 + $tempdir = strtolower(str_replace('\\','/', $tempdir));
83 83 return ($tempdir == $this->temp_dir);
84 84 }
85 85  
... ...