~feathereye/feathereye/trunk

« back to all changes in this revision

Viewing changes to Models/ApacheConfWildcardPathToFiles.php

  • Committer: johnw
  • Date: 2011-10-28 14:14:18 UTC
  • Revision ID: svn-v4:a426756d-6b1c-4e67-886b-f22621885077:trunk/FrogEnvoy:112
Replace exec with glob function to expand globbed file names - because I was uneasy executing un-escaped shell arg which was being picked up from 3rd party strings inside the logging directives.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
        /**
17
17
        * @desc 
18
 
        * @todo I do not like this exec invocation. Praps replace with a preg and scandir.
19
18
        */
20
19
        public function getExpandedFileListArray()
21
20
                {
22
 
                $fileListArray = array();
23
 
 
24
 
                exec( 'ls ' . $this->_filePath , $outputlines );
25
 
 
26
 
                foreach( $outputlines as $expandedFilePath ) 
27
 
                        {
28
 
                        $fileListArray[] = $expandedFilePath;
29
 
                        }
30
 
                
31
 
                return $fileListArray;
 
21
 
 
22
                $fileListArray = glob( $this->_filePath );
 
23
 
 
24
                return ( is_array( $fileListArray ) ) ? $fileListArray : array();
32
25
                }
33
26
        }
 
 
b'\\ No newline at end of file'