View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015572 | mantisbt | attachments | public | 2013-03-06 05:56 | 2014-02-07 18:24 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.14 | ||||
Target Version | 1.2.16 | Fixed in Version | 1.2.16 | ||
Summary | 0015572: diskfile_is_name_unique() can return non-unique filename | ||||
Description | There are cases where the diskfile_is_name_unique() API function can return true, even if a file exists because it does not perform a check against the file system. Furthermore, it only checks mantis_bug_file_table, which means that when dealing with project files there is in fact no uniqueness check at all. | ||||
Tags | No tags attached. | ||||
MantisBT: master 360ffc0f 2013-03-05 23:19 Details Diff |
Modify file_is_name_unique() API to work for project files also Previously this function would only work for bug attachments, and another API function project_file_is_name_unique() would take care of projects. The latter was removed as it was not used, and this one amended in case it's ever required to check for uniqueness of a project file. It also makes sense to regroup file-related functions in file_api.php. Issue 0015572 |
Affected Issues 0015572 |
|
mod - core/file_api.php | Diff File | ||
MantisBT: master-1.2.x 67bbf86b 2013-03-05 23:19 Details Diff |
Modify file_is_name_unique() API to work for project files also Previously this function would only work for bug attachments, and another API function project_file_is_name_unique() would take care of projects. The latter was removed as it was not used, and this one amended in case it's ever required to check for uniqueness of a project file. It also makes sense to regroup file-related functions in file_api.php. Issue 0015572 |
Affected Issues 0015572 |
|
mod - core/file_api.php | Diff File | ||
MantisBT: master 65c4ce7b 2013-03-06 00:50 Details Diff |
Revise and improve diskfile_is_name_unique() Prior to this, the API would only check for a file's uniqueness by looking up the bug_file table, and did not actually checking the file system for an existing file. This causes 2 potential issues: - we could have a duplicate in the file system and therefore unwittingly overwrite it with a new file - it was not possible to use the function for for project docs Fixes 0015572 |
Affected Issues 0015572 |
|
mod - core/file_api.php | Diff File | ||
MantisBT: master-1.2.x f6b8f7e9 2013-03-06 00:50 Details Diff |
Revise and improve diskfile_is_name_unique() Prior to this, the API would only check for a file's uniqueness by looking up the bug_file table, and did not actually checking the file system for an existing file. This causes 2 potential issues: - we could have a duplicate in the file system and therefore unwittingly overwrite it with a new file - it was not possible to use the function for for project docs Fixes 0015572 |
Affected Issues 0015572 |
|
mod - core/file_api.php | Diff File |