Issues (314)

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/ModulesHandler.php (1 issue)

1
<?php
2
3
namespace XoopsModules\Modulebuilder;
4
5
/*
6
 You may not change or alter any portion of this comment or credits
7
 of supporting developers from this source code or any supporting source code
8
 which is considered copyrighted (c) material of the original comment or credit authors.
9
10
 This program is distributed in the hope that it will be useful,
11
 but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 */
14
15
/**
16
 * modules class.
17
 *
18
 * @copyright       XOOPS Project (https://xoops.org)
19
 * @license         GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
20
 *
21
 * @since           2.5.7
22
 *
23
 * @author          Txmod Xoops <[email protected]> - <https://xoops.org/>
24
 *
25
 */
26
27
/**
28
 * @Class ModulesHandler
29
 * @extends \XoopsPersistableObjectHandler
30
 */
31
class ModulesHandler extends \XoopsPersistableObjectHandler
32
{
33
    /**
34
     * @public function constructor class
35
     *
36
     * @param null|\XoopsDatabase|\XoopsMySQLDatabase $db
37
     */
38
    public function __construct(\XoopsDatabase $db)
39
    {
40
        parent::__construct($db, 'modulebuilder_modules', Modules::class, 'mod_id', 'mod_name');
41
    }
42
43
    /**
44
     * @param bool $isNew
45
     *
46
     * @return \XoopsObject
47
     */
48
    public function create($isNew = true)
49
    {
50
        return parent::create($isNew);
51
    }
52
53
    /**
54
     * retrieve a field.
55
     *
56
     * @param int  $i field id
57
     * @param null $fields
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $fields is correct as it would always require null to be passed?
Loading history...
58
     *
59
     * @return mixed reference to the <a href='psi_element://Fields'>Fields</a> object
60
     *               object
61
     */
62
    public function get($i = null, $fields = null)
63
    {
64
        return parent::get($i, $fields);
65
    }
66
67
    /**
68
     * get inserted id.
69
     *
70
     * @param null
71
     *
72
     * @return int reference to the {@link Tables} object
73
     */
74
    public function getInsertId()
75
    {
76
        return $this->db->getInsertId();
77
    }
78
79
    /**
80
     * Get Count Modules.
81
     *
82
     * @param int    $start
83
     * @param int    $limit
84
     * @param string $sort
85
     * @param string $order
86
     *
87
     * @return int
88
     */
89
    public function getCountModules($start = 0, $limit = 0, $sort = 'mod_id', $order = 'DESC')
90
    {
91
        $crCountModules = new \CriteriaCompo();
92
        $crCountModules = $this->getModulesCriteria($crCountModules, $start, $limit, $sort, $order);
93
94
        return $this->getCount($crCountModules);
95
    }
96
97
    /**
98
     * Get All Modules.
99
     *
100
     * @param int    $start
101
     * @param int    $limit
102
     * @param string $sort
103
     * @param string $order
104
     *
105
     * @return array
106
     */
107
    public function getAllModules($start = 0, $limit = 0, $sort = 'mod_id', $order = 'DESC')
108
    {
109
        $crAllModules = new \CriteriaCompo();
110
        $crAllModules = $this->getModulesCriteria($crAllModules, $start, $limit, $sort, $order);
111
112
        return $this->getAll($crAllModules);
113
    }
114
115
    /**
116
     * Get Modules Criteria.
117
     *
118
     * @param $crModules
119
     * @param $start
120
     * @param $limit
121
     * @param $sort
122
     * @param $order
123
     *
124
     * @return mixed
125
     */
126
    private function getModulesCriteria($crModules, $start, $limit, $sort, $order)
127
    {
128
        $crModules->setStart($start);
129
        $crModules->setLimit($limit);
130
        $crModules->setSort($sort);
131
        $crModules->setOrder($order);
132
133
        return $crModules;
134
    }
135
}
136