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