View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012582 | mantisbt | api soap | public | 2010-12-05 23:08 | 2011-04-05 14:23 |
| Reporter | hallids | Assigned To | rombert | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.2.3 | ||||
| Target Version | 1.2.5 | Fixed in Version | 1.2.5 | ||
| Summary | 0012582: SQL fail when uploading file via mantis connect API | ||||
| Description | api/soap/mc_file_api.php:119 The removal of the single quotes from around $c_content has caused the SQL query to fail when the file upload method is DISK (and, I assume, FTP) because the $c_content variable is set to an empty string. | ||||
| Additional Information | I do not know if there was a reason for the removal of the quotes but this change will fix the problem for DISK upload type. I have not tested for DATABASE upload type. --- ../mantisbt-1.2.0/api/soap/mc_file_api.php 2010-12-06 14:36:20.000000000 +1030
| ||||
| Tags | patch | ||||
|
Oops.. ignore the version numbers in the diff above. Version 1.2.0 actually had the single quotes around $c_content, version 1.2.3 does not. This may be a better fix anyway.. @@ -103,11 +103,11 @@
|
|
|
Does this still happen with 1.2.4? Also, I don't see how your patch would affect the SQL result, since it is in the FTP && DISK path. |
|
|
I'm sorry I don't have 1.2.4 but my patch fixes this version because if $c_content is empty it inserts an empty string instead of making the SQL invalid. Or, in the second fix in the bugnote, it inserts NULL instead of making the SQL invalid. |
|
|
Yes it still happen for me in 1.2.4. but as i'm not a expert, perhaps my code to store the content is wrong |
|
|
I've committed a patch for both branches which closely mimics the core file_add calls. Can you please retry and see if a version downloaded from git works now? |
|
|
I had to roll this back due to errors, so don't test yet. |
|
|
MantisBT: master ace52399 2011-02-08 16:50 Details Diff |
Revert "Revert "Update mci_file_add to look more like file_add"" Fixes 0012582: SQL fail when uploading file via mantis connect API This reverts commit 4d596e03a9a97bfe1ce8c56d9eb56ba5576daa6f. |
Affected Issues 0012582 |
|
| mod - api/soap/mc_file_api.php | Diff File | ||
|
MantisBT: master-1.2.x 3b5c18e5 2011-02-08 16:52 Details Diff |
Revert "Revert "Update mci_file_add to look more like file_add"" Fixes 0012582: SQL fail when uploading file via mantis connect API This reverts commit 9bdbe29c0faadc49e7dcd235649ade9191482529. |
Affected Issues 0012582 |
|
| mod - api/soap/mc_file_api.php | Diff File | ||