CodeIgniter Forums
Function delete_files has a bug - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Function delete_files has a bug (/showthread.php?tid=74137)



Function delete_files has a bug - wasabi - 07-29-2019

Hi,
into file /system/helpers/file_helper on line 143 the code check if the "filename" start not with dot but if it is a "directory", and not a file, it's a problem on line 149.

I found this bug about cache dir and someone tried to open a url like http://url/.somethings/xxx

I have fixed quickly with a rules on route but probably is more correct fix the CI file.

Another suggestion?


RE: Function delete_files has a bug - php_rocs - 07-29-2019

@wasabi,

If you feel that you have found a serious bug in CI, please report it on Github (https://github.com/bcit-ci/CodeIgniter/issues)


RE: Function delete_files has a bug - ciadmin - 07-29-2019

Files & folders that start with a dot are supposed to be hidden files/folders, per unix/linux filenaming. I would think that trying to reference one would give a 404 or equivalent.

You said there is a bug but did not describe the error you encountered, the behavior that you expected, or the CI version you are using, Those are prtty important for a bug report.