Issues (446)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

ObjectInterfaces/DirectoryTreeInterface.inc (4 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*******************************************************************
3
 * Created by:  Marko Kungla @ OkramLabs on Aug 6, 2012 - 9:00:29
4
 * Contact:     [email protected] - https://okramlabs.com
5
 * @copyright   2015 OkramLabs - https://okramlabs.com
6
 * @license     MIT
7
 *
8
 * Package name:libhowi-filesystem
9
 * @category	HOWI3
10
 * @package		libhowi
11
 * @subpackage	filesystem
12
 * 
13
 * Lang:        PHP
14
 * Encoding:    UTF-8
15
 * File:        DirectoryTreeInterface.inc
16
 * @link        https://
17
 ********************************************************************
18
 * Contributors:
19
 * @author Marko Kungla <[email protected]>
20
 *           Github: https://github.com/mkungla
21
 ********************************************************************
22
 * Comments:
23
 */
24
namespace HOWI3\libhowi\Filesystem\Commons\ObjectInterfaces;
25
26
interface DirectoryTreeInterface
27
{
28
29
    /**
30
     * Returns an iterator for the requested child item if it is a directory
31
     *
32
     * @return DirectoryTreeObject
33
     */
34
    public function c($basename = false);
35
36
    /**
37
     * hasChildren override
38
     *
39
     * Original inherited RecursiveDirectoryIterator::hasChildren()
40
     * function returns whether current entry is a directory and not '.' or '..'
41
     * However this function tells wether current item is a directory and has items in the directory
42
     * NB The iterators pointer position do not affect this function
43
     *
44
     * @param string $allow_links            
0 ignored issues
show
Should the type for parameter $allow_links not be false|string?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
45
     * @return boolean
46
     */
47
    public function hasChildren($allow_links = false);
48
49
    /**
50
     * Returns an iterator for the current entry if it is a directory
51
     *
52
     * @return DirectoryTreeObject
53
     */
54
    public function getChildren();
55
56
    /**
57
     * Get sub path
58
     *
59
     * @return string
60
     */
61
    public function getSubPath();
62
63
    /**
64
     * Get sub path and name
65
     *
66
     * @return string
67
     */
68
    public function getSubPathname();
69
70
    /**
71
     * Rewind the DirectoryIterator back to the start
72
     *
73
     * @return void
74
     */
75
    public function rewind();
76
77
    /**
78
     * Move forward to next DirectoryIterator item
79
     *
80
     * @return void
81
     */
82
    public function next();
83
84
    /**
85
     * Return the key for the current DirectoryIterator item
86
     *
87
     * @return string
88
     */
89
    public function key();
90
91
    /**
92
     * Get the handling flags
93
     *
94
     * @return int The integer value of the set flags.
95
     */
96
    public function getFlags();
97
98
    /**
99
     * Sets handling flags
100
     *
101
     * @param int $flags            
102
     * @return void
103
     */
104
    public function setFlags($flags);
105
106
    /**
107
     * Return file name of current DirectoryIterator item.
108
     *
109
     * @return string
110
     */
111
    public function getFilename();
112
113
    /**
114
     * Gets the file extension
115
     *
116
     * @return string
117
     */
118
    public function getExtension();
119
120
    /**
121
     * Determine if current DirectoryIterator item is '.' or '..'
122
     *
123
     * @return boolean
124
     */
125
    public function isDot();
126
127
    /**
128
     * Check whether current DirectoryIterator position is a valid file
129
     *
130
     * @return boolean
131
     */
132
    public function valid();
133
134
    /**
135
     * Seek to a DirectoryIterator item
136
     * 
137
     * @return void
138
     */
139
    public function seek($position);
140
141
    /**
142
     * Get file name as a string
143
     * 
144
     * @return string
145
     */
146
    public function __toString();
147
    
148
    /**
149
     * Return path and file name of current DirectoryIterator item
150
     *
151
     * @return string $pathnamae
152
     */
153
    public function getPathname();
154
    
155
    /**
156
     * Get the permissions of current DirectoryIterator item (non octal)
157
     *
158
     * @return int like 755
159
     */
160
    public function getPerms();
161
    
162
    /**
163
     * Get inode for the current DirectoryIterator item
164
     *
165
     * @return int inode
166
     */
167
    public function getInode();
168
    
169
    /**
170
     * Get owner ID of current DirectoryIterator item
171
     *
172
     * @return int ID
173
     */
174
    public function getOwner();
175
    
176
    /**
177
     * Get group ID for the current DirectoryIterator item
178
     *
179
     * @return int group id
180
     */
181
    public function getGroup();
182
    
183
    /**
184
     * list directory contents by key => value
185
     * @param string $sort
0 ignored issues
show
Should the type for parameter $sort not be false|string?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
186
     * @return array key value
187
     */
188
    public function ls($sort = false);
189
    
190
    /**
191
     * list directory contents by key => value (holding info object)
192
     * stdClass();
193
     * ->name = $this->getFilename();
194
     * ->type = $this->getType();
195
     * ->size = $this->getSize($convert);
196
     * ->taccess = $this->getATime($timeformat);
197
     * ->tchange = $this->getCTime($timeformat);
198
     * ->tmodify = $this->getMTime($timeformat);
199
     * @param string $sort
0 ignored issues
show
Should the type for parameter $sort not be false|string?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
200
     * @return array of objects
201
     */
202
    public function lsInfo($sort = false, $convert = false, $timeformat = false);
203
    
204
    /**
205
     * Get a nested directory tree as a multidimensional array for curent item
206
     */
207
    public function lsTree();
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
208
}