Changeset 960

Show
Ignore:
Timestamp:
03/03/2008 02:10:01 AM (3 years ago)
Author:
DotMG
Message:

Files beginning with a dot (.) are not listed. (files.php)

Files beginning with a dot (.) cannot be accessed through files.xml handler.

refs #692

Location:
branches/1.1.6.4
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1.6.4/actions/files.php

    r387 r960  
    2525 * @uses        Wakka::IsAdmin() 
    2626 * @uses        Wakka::MiniHref() 
     27 * @uses        Wakka::href() 
     28 * @uses        Wakka::FormClose() 
     29 * @uses        Wakka::GetPageTag() 
    2730 * @uses        Wakka::htmlspecialchars_ent() 
    2831 * 
     
    196199    $dir = opendir($upload_path); 
    197200    while ($file = readdir($dir)) { 
    198         if ($file != '.' && $file != '..') { 
     201        if (!preg_match('/^\\./', $file)) { 
    199202                        $num++; 
    200203                                // if ($this->HasAccess('write')) { 
  • branches/1.1.6.4/handlers/page/files.xml.php

    r396 r960  
    3838                        #$_REQUEST['file'] = basename($_REQUEST['file']); 
    3939                        $_GET['file'] = basename($_GET['file']); #312 
    40             if ($this->HasAccess('read')) { 
     40            if (($this->HasAccess('read')) && (!preg_match('/^\\./', $_GET['file']))) { 
    4141                                #$path = "{$upload_path}/{$_REQUEST['file']}"; 
    4242                                $path = $upload_path.DIRECTORY_SEPARATOR.$_GET['file']; #89, #312