Hi
I did a fresh install of v2.5beta3 and found when I was in the Admin Home page that it was reporting the configure.php file as being writeable when I knew that I had set permissions correctly.
I found that the admin page was not differentiating between the catalog configure and the admin configure files.
I wrote a blog on it and included the code changes that I made at
Tonys Tech Blog » Blog Archive » oscMax Admin page reports configure.php as writeable when it is not
But my Wordpress site is not setup to handle 'code' politely and is messing with the formatting. So I've copied the changes here.
Two files need changing:
admin/includes/languages/english/index.php
modify the setting at line 115
:: only change is to add the word ‘catalog’ in the text.Code:define('WARNING_CONFIG_FILE_WRITEABLE', 'Error: I am able to write to the catalog configuration file: ' . (DIR_FS_CATALOG) . 'includes/configure.php. This is a potential security risk - please set the right user permissions on this file.');
Then add a new constant setting at line 116
:: the main changes here highlight that its the admin configure file that is the issue.Code:define('WARNING_ADMIN_CONFIG_FILE_WRITEABLE', 'Error: I am able to write to the admin configuration file: ' . (DIR_FS_ADMIN) . 'includes/configure.php. This is a potential security risk - please set the right user permissions on this file.');
Then update the system.php file that calls the above messages:
:: the main changes are copying the config check to test the catalog configure, the nesting of the dirname function to get the parent directory for the catalog, and the change to the code comments to differentiate between the two checks.
admin/includes/modules/dashboard/system.php
at around line 117 to replace the section referring to the configure file with the following code:
Save your files and test by changing the permissions on each configure.php file to being writeable. Change the permissions back and in future the Admin screen will highlight if you have unwanted changes to the permissions.Code:<!-- Start check for catalog configure file --> <?php if ( (file_exists(dirname(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])) . '/includes/configure.php')) && (is_writeable(dirname(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])) . '/includes/configure.php')) ) { $system_permission_errors++; ?> <tr> <td class="messageStackError"><?php echo tep_image(DIR_WS_ICONS . 'error.gif') . ' ' . WARNING_CONFIG_FILE_WRITEABLE; ?></td> </tr> <?php } ?> <!-- End check for catalog configure file --> <!-- Start check for admin configure file --> <?php if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $system_permission_errors++; ?> <tr> <td class="messageStackError"><?php echo tep_image(DIR_WS_ICONS . 'error.gif') . ' ' . WARNING_ADMIN_CONFIG_FILE_WRITEABLE; ?></td> </tr> <?php } ?> <!-- End check for admin configure file -->
cheers
Tony





LinkBack URL
About LinkBacks





Reply With Quote




so endith the lesson


Bookmarks