Skip to content

Commit

Permalink
Fix #11415: Check executable bit on admin/ folder, not readable bit
Browse files Browse the repository at this point in the history
login_page has a check that warns if the admin/ folder is still in
place. However this check uses is_readable() instead of is_executable().
In the case of folders, the read bit determines who can list the
directory. The execute bit determines who can traverse and access files
within the directory.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
  • Loading branch information
urkle authored and davidhicks committed Mar 31, 2010
1 parent 666e231 commit 4eb5d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion login_page.php
Expand Up @@ -210,7 +210,7 @@

# Check if the admin directory is available and is readable.
$t_admin_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR;
if ( is_dir( $t_admin_dir ) && is_readable( $t_admin_dir ) ) {
if ( is_dir( $t_admin_dir ) && is_executable( $t_admin_dir ) ) {
echo '<div class="warning" align="center">', "\n";
echo '<p><font color="red">', lang_get( 'warning_admin_directory_present' ), '</font></p>', "\n";
echo '</div>', "\n";
Expand Down

0 comments on commit 4eb5d9a

Please sign in to comment.