Issues (1107)

Security Analysis    not enabled

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.

lib/elFinderVolumeGroup.class.php (2 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
/**
4
 * elFinder driver for Volume Group.
5
 *
6
 * @author Naoki Sawada
7
 **/
8
class elFinderVolumeGroup extends elFinderVolumeDriver
9
{
10
    /**
11
     * Driver id
12
     * Must be started from letter and contains [a-z0-9]
13
     * Used as part of volume id.
14
     *
15
     * @var string
16
     **/
17
    protected $driverId = 'g';
18
19
    /**
20
     * Constructor
21
     * Extend options with required fields.
22
     */
23
    public function __construct()
24
    {
25
        $this->options['type'] = 'group';
26
        $this->options['path'] = '/';
27
        $this->options['dirUrlOwn'] = true;
28
        $this->options['syncMinMs'] = 0;
29
        $this->options['tmbPath'] = '';
30
        $this->options['disabled'] = [
31
            'archive',
32
            'cut',
33
            'duplicate',
34
            'edit',
35
            'extract',
36
            'getfile',
37
            'mkdir',
38
            'mkfile',
39
            'paste',
40
            'rename',
41
            'resize',
42
            'rm',
43
            'upload',
44
        ];
45
    }
46
47
    /*********************************************************************/
48
    /*                               FS API                              */
49
    /*********************************************************************/
50
51
    /*********************** paths/urls *************************/
52
53
    /**
54
     * {@inheritdoc}
55
     **/
56
    protected function _dirname($path)
57
    {
58
        return '/';
59
    }
60
61
    /**
62
     * {@inheritdoc}
63
     **/
64
    protected function _basename($path)
65
    {
66
        return '';
67
    }
68
69
    /**
70
     * {@inheritdoc}
71
     **/
72
    protected function _joinPath($dir, $name)
73
    {
74
        return '/'.$name;
75
    }
76
77
    /**
78
     * {@inheritdoc}
79
     **/
80
    protected function _normpath($path)
81
    {
82
        return '/';
83
    }
84
85
    /**
86
     * {@inheritdoc}
87
     **/
88
    protected function _relpath($path)
89
    {
90
        return '/';
91
    }
92
93
    /**
94
     * {@inheritdoc}
95
     **/
96
    protected function _abspath($path)
97
    {
98
        return '/';
99
    }
100
101
    /**
102
     * {@inheritdoc}
103
     **/
104
    protected function _path($path)
105
    {
106
        return '/';
107
    }
108
109
    /**
110
     * {@inheritdoc}
111
     **/
112
    protected function _inpath($path, $parent)
113
    {
114
        return false;
115
    }
116
117
    /***************** file stat ********************/
118
119
    /**
120
     * {@inheritdoc}
121
     **/
122
    protected function _stat($path)
123
    {
124
        if ($path === '/') {
125
            return [
126
                'size' => 0,
127
                'ts' => 0,
128
                'mime' => 'directory',
129
                'read' => true,
130
                'write' => false,
131
                'locked' => true,
132
                'hidden' => false,
133
                'dirs' => 0,
134
            ];
135
        }
136
137
        return false;
138
    }
139
140
    /**
141
     * {@inheritdoc}
142
     **/
143
    protected function _subdirs($path)
144
    {
145
        $dirs = false;
146
        if ($path === '/') {
147
            return true;
148
        }
149
150
        return $dirs;
151
    }
152
153
    /**
154
     * {@inheritdoc}
155
     **/
156
    protected function _dimensions($path, $mime)
157
    {
158
        return false;
159
    }
160
161
    /******************** file/dir content *********************/
162
163
    /**
164
     * {@inheritdoc}
165
     **/
166
    protected function readlink($path)
0 ignored issues
show
The parameter $path is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
167
    {
168
    }
169
170
    /**
171
     * {@inheritdoc}
172
     **/
173
    protected function _scandir($path)
174
    {
175
        return [];
176
    }
177
178
    /**
179
     * {@inheritdoc}
180
     **/
181
    protected function _fopen($path, $mode = 'rb')
182
    {
183
        return false;
184
    }
185
186
    /**
187
     * {@inheritdoc}
188
     **/
189
    protected function _fclose($fp, $path = '')
190
    {
191
        return true;
192
    }
193
194
    /********************  file/dir manipulations *************************/
195
196
    /**
197
     * {@inheritdoc}
198
     **/
199
    protected function _mkdir($path, $name)
200
    {
201
        return false;
202
    }
203
204
    /**
205
     * {@inheritdoc}
206
     **/
207
    protected function _mkfile($path, $name)
208
    {
209
        return false;
210
    }
211
212
    /**
213
     * {@inheritdoc}
214
     **/
215
    protected function _symlink($source, $targetDir, $name)
216
    {
217
        return false;
218
    }
219
220
    /**
221
     * {@inheritdoc}
222
     **/
223
    protected function _copy($source, $targetDir, $name)
224
    {
225
        return false;
226
    }
227
228
    /**
229
     * {@inheritdoc}
230
     **/
231
    protected function _move($source, $targetDir, $name)
232
    {
233
        return false;
234
    }
235
236
    /**
237
     * {@inheritdoc}
238
     **/
239
    protected function _unlink($path)
240
    {
241
        return false;
242
    }
243
244
    /**
245
     * {@inheritdoc}
246
     **/
247
    protected function _rmdir($path)
248
    {
249
        return false;
250
    }
251
252
    /**
253
     * {@inheritdoc}
254
     **/
255
    protected function _save($fp, $dir, $name, $stat)
256
    {
257
        return false;
258
    }
259
260
    /**
261
     * {@inheritdoc}
262
     **/
263
    protected function _getContents($path)
264
    {
265
        return false;
266
    }
267
268
    /**
269
     * {@inheritdoc}
270
     **/
271
    protected function _filePutContents($path, $content)
272
    {
273
        return false;
274
    }
275
276
    /**
277
     * {@inheritdoc}
278
     **/
279
    protected function _checkArchivers()
280
    {
281
    }
282
283
    /**
284
     * {@inheritdoc}
285
     **/
286
    protected function _chmod($path, $mode)
287
    {
288
        return false;
289
    }
290
291
    /**
292
     * {@inheritdoc}
293
     **/
294
    protected function _findSymlinks($path)
0 ignored issues
show
The parameter $path is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
295
    {
296
        return false;
297
    }
298
299
    /**
300
     * {@inheritdoc}
301
     **/
302
    protected function _extract($path, $arc)
303
    {
304
        return false;
305
    }
306
307
    /**
308
     * {@inheritdoc}
309
     **/
310
    protected function _archive($dir, $files, $name, $arc)
311
    {
312
        return false;
313
    }
314
}
315