Issues (380)

Security Analysis    not enabled

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

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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.

class/Uploader.php (1 issue)

1
<?php
2
3
namespace XoopsModules\Newbb;
4
5
/**
6
 * NewBB, XOOPS forum module
7
 *
8
 * @copyright      XOOPS Project (https://xoops.org)
9
 * @license        GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
10
 * @author         Taiwen Jiang (phppp or D.J.) <[email protected]>
11
 * @since          4.00
12
 * @package        module::newbb
13
 */
14
15
16
17
require_once $GLOBALS['xoops']->path('class/uploader.php');
18
19
/**
20
 * Class Uploader
21
 */
22
class Uploader extends \XoopsMediaUploader
23
{
24
    /**
25
     * No admin check for uploads
26
     * @param mixed $uploadDir
27
     * @param mixed $allowedMimeTypes
28
     * @param mixed $maxFileSize
29
     * @param mixed $maxWidth
30
     * @param mixed $maxHeight
31
     */
32
33
    /**
34
     * Constructor
35
     *
36
     * @param string           $uploadDir
37
     * @param array|int|string $allowedMimeTypes
38
     * @param int              $maxFileSize
39
     * @param int              $maxWidth
40
     * @param int              $maxHeight
41
     */
42
    public function __construct($uploadDir, $allowedMimeTypes = 0, $maxFileSize = 0, $maxWidth = 0, $maxHeight = 0)
43
    {
44
        //        $this->XoopsMediaUploader($uploadDir, $allowedMimeTypes, $maxFileSize, $maxWidth, $maxHeight);
45
46
        if (!\is_array($allowedMimeTypes)) {
47
            if (empty($allowedMimeTypes) || '*' === $allowedMimeTypes) {
48
                $allowedMimeTypes = [];
49
            } else {
50
                $allowedMimeTypes = \array_filter(\array_map('\trim', \explode('|', mb_strtolower($allowedMimeTypes))));
51
            }
52
        }
53
        $_allowedMimeTypes = [];
54
        $extensionToMime   = require $GLOBALS['xoops']->path('include/mimetypes.inc.php');
55
        foreach ($allowedMimeTypes as $type) {
56
            if (isset($extensionToMime[$type])) {
57
                $_allowedMimeTypes[] = $extensionToMime[$type];
58
            } else {
59
                $_allowedMimeTypes[] = $type;
60
            }
61
        }
62
        parent::__construct($uploadDir, $_allowedMimeTypes, $maxFileSize, $maxWidth, $maxHeight);
63
    }
64
65
    /**
66
     * Set the CheckMediaTypeByExt
67
     * Deprecated
68
     *
69
     * @param bool|string $value
70
     */
71
    public function setCheckMediaTypeByExt($value = true)
72
    {
73
    }
74
75
    /**
76
     * Set the imageSizeCheck
77
     * Deprecated
78
     *
79
     * @param string $value
80
     */
81
    public function setImageSizeCheck($value)
82
    {
83
    }
84
85
    /**
86
     * Set the fileSizeCheck
87
     * Deprecated
88
     *
89
     * @param string $value
90
     */
91
    public function setFileSizeCheck($value)
92
    {
93
    }
94
95
    /**
96
     * Get the file extension
97
     *
98
     * @return string
99
     */
100
    public function getExt()
101
    {
102
        $this->ext = mb_strtolower(\ltrim(mb_strrchr($this->getMediaName(), '.'), '.'));
0 ignored issues
show
Bug Best Practice introduced by
The property ext does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
103
104
        return $this->ext;
105
    }
106
}
107