View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001154 | OXID eShop (all versions) | 2. ----- eShop backend (admin) ----- | public | 2009-07-31 14:15 | 2009-08-05 16:59 |
Reporter | marco_steinhaeuser | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.1.3 revision 19918 | ||||
Fixed in Version | 4.1.5 revision 21618 | ||||
Summary | 0001154: upload using oxUtilsFile() | ||||
Description | Uploading a file using class oxUtilsFile line 551, an existing filename will be extended by adding a (1) to the file name. Doing that a lot of times, the file name becomes something like "name(1)(1)(1)(1)(1).dat" <-- this is how you can crash the best file system. | ||||
Additional Information | http://www.oxid-esales.com/forum/showthread.php?t=1912 Solution (thanks inveris!) ========================== in core/oxutilsfile.php, line 551, replace //file exists ? while (file_exists($sBasePath . "/" .$sUploadPath . "/" . $sFileName . "." . $sExt)) { $sFileName .= "(1)"; } by //file exists ? $fileCounter = 0; $tempFileName = $sFileName; while (file_exists($sBasePath . "/" .$sUploadPath . "/" . $sFileName . "." . $sExt)) { $fileCounter++; $sFileName = $tempFileName . "($fileCounter)"; } | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||