Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: apmuthu on November 05, 2014, 06:43:42 PM

Title: Error on blank file edit
Post by: apmuthu on November 05, 2014, 06:43:42 PM
On the demo page, the following URL gives an error on missing file or blank file:
https://185.4.149.65:2031/index.php?module=file_editor&file=/usr/local/apache/conf.d/empty.conf
Quote
Warning: fread(): Length parameter must be greater than 0 in /usr/local/cwpsrv/htdocs/resources/admin/modules/file_editor.php(1) : eval()'d code(1) : eval()'d code on line 18
Could not read file!

There is a confusion between 0 length and boolean false in some if check.