View Issue Details

IDProjectCategoryView StatusLast Update
0002940mantisbtbugtrackerpublic2003-12-13 04:44
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.18.0a1 
Summary0002940: Error when uploading document with no upload path
Description

If an attempt is made to add a document to a project while the project has not upload path, the following error is generated:

SYSTEM WARNING: Unable to create '0000001-cradle.jpg': Permission denied
(proj_doc_add.php: line 47)

It seems that code attempts to upload to current or root directory (not sure). There are two problems here:

  • The document information is still added successfully! (as per the message)
  • There is no error messages to notify the user that the upload path is not set for the current project.
TagsNo tags attached.

Activities

vboctor

vboctor

2003-02-26 12:12

manager   ~0003842

Fixed in CVS. Will be included in 0.18.0a3.

Related Changesets

MantisBT: master a943af3d

2003-02-26 06:12

vboctor


Details Diff
This commit includes two related fixes:
- Fix 0002075: Mantis does not correctly display images when they are clicked ( $g_file_upload_method = DATABASE
).
- Fix 0002940: Error when uploading document with no upload path.

M bug_file_add.php
- Moved the checking of the upload path to file_add() in file_api.php

M proj_doc_add.php
- Added checking for the upload path (not empty, exists, writable, and directory)

M core/file_api.php
- (file_add):
- Fixed a bug where filesize was equal to 0. This caused files not to be uploaded to DATABASE.
- Some readability changes.
- Added checking for the upload path (not empty, exists, writable, and directory)
- (file_ensure_valid_upload_path)
- Changed to reject empty paths.

M core/project_api.php
- (project_create): Send path for validation only if not empty.
- (project_update): Send path for validation only if not empty.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2042 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0002075, 0002940
mod - core/project_api.php Diff File
mod - doc/ChangeLog Diff File
mod - proj_doc_add.php Diff File
mod - core/file_api.php Diff File
mod - bug_file_add.php Diff File