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

Labels
Severity
1
<?php
2
3
namespace XoopsModules\Modulebuilder\Files;
4
5
use XoopsModules\Modulebuilder;
6
use XoopsModules\Modulebuilder\Files;
7
8
/*
9
 You may not change or alter any portion of this comment or credits
10
 of supporting developers from this source code or any supporting source code
11
 which is considered copyrighted (c) material of the original comment or credit authors.
12
13
 This program is distributed in the hope that it will be useful,
14
 but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
 */
17
/**
18
 * modulebuilder module.
19
 *
20
 * @copyright       XOOPS Project (https://xoops.org)
21
 * @license         GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
22
 *
23
 * @since           2.5.0
24
 *
25
 * @author          Txmod Xoops https://xoops.org 
26
 *                  Goffy https://myxoops.org
27
 *
28
 */
29
30
/**
31
 * Class CreateTableFields
32
 */
33
class CreateTableFields extends Files\CreateAbstractClass
34
{
35
    /**
36
     * @public   function constructor
37
     */
38
    public function __construct()
39
    {
40
    }
41
42
    /**
43
     * @static function getInstance
44
     *
45
     * @return bool|\ModuleBuilderTableFields
0 ignored issues
show
The type ModuleBuilderTableFields was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
46
     */
47
    public static function getInstance()
48
    {
49
        static $instance = false;
50
        if (!$instance) {
51
            $instance = new self();
52
        }
53
54
        return $instance;
55
    }
56
57
    /**
58
     * @public function getTableTables
59
     *
60
     * @param        $mId
61
     *
62
     * @param string $sort
63
     * @param string $order
64
     * @return mixed
65
     */
66
    public function getTableTables($mId, $sort = 'table_id ASC, table_name', $order = 'ASC')
67
    {
68
        $criteria = new \CriteriaCompo();
69
        $criteria->add(new \Criteria('table_mid', $mId)); // $mId = module Id
70
        $criteria->setSort($sort);
71
        $criteria->setOrder($order);
72
        $tables = Modulebuilder\Helper::getInstance()->getHandler('Tables')->getObjects($criteria);
73
        unset($criteria);
74
75
        return $tables;
76
    }
77
78
    /**
79
     * @public function getTableFields
80
     *
81
     * @param        $mId
82
     * @param        $tId
83
     *
84
     * @param string $sort
85
     * @param string $order
86
     * @return mixed
87
     */
88
    public function getTableFields($mId, $tId, $sort = 'field_order ASC, field_id', $order = 'ASC')
89
    {
90
        $criteria = new \CriteriaCompo();
91
        $criteria->add(new \Criteria('field_mid', $mId)); // $mId = module Id
92
        $criteria->add(new \Criteria('field_tid', $tId)); // $tId = table Id
93
        $criteria->setSort($sort);
94
        $criteria->setOrder($order);
95
        $fields = Modulebuilder\Helper::getInstance()->getHandler('Fields')->getObjects($criteria);
96
        unset($criteria);
97
98
        return $fields;
99
    }
100
101
    /**
102
     * @public function getTableFieldelements
103
     *
104
     * @param        $mId
105
     * @param        $tId
106
     *
107
     * @param string $sort
108
     * @param string $order
109
     * @return mixed
110
     */
111
    public function getTableFieldelements($mId = null, $tId = null, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
112
    {
113
        $criteria = new \CriteriaCompo();
114
        if (null != $mId) {
115
            $criteria->add(new \Criteria('fieldelement_mid', $mId)); // $mId = module Id
116
            $criteria->setSort($sort);
117
            $criteria->setOrder($order);
118
        }
119
        if (null != $tId) {
120
            $criteria->add(new \Criteria('fieldelement_tid', $tId)); // $tId = table Id
121
            $criteria->setSort($sort);
122
            $criteria->setOrder($order);
123
        }
124
        $fieldElements = Modulebuilder\Helper::getInstance()->getHandler('Fieldelements')->getObjects($criteria);
125
        unset($criteria);
126
127
        return $fieldElements;
128
    }
129
130
    /**
131
     * @public function getTableMorefiles
132
     *
133
     * @param        $mId
134
     *
135
     * @param string $sort
136
     * @param string $order
137
     * @return mixed
138
     */
139
    public function getTableMorefiles($mId, $sort = 'file_id ASC, file_name', $order = 'ASC')
140
    {
141
        $criteria = new \CriteriaCompo();
142
        $criteria->add(new \Criteria('file_mid', $mId)); // $mId = module Id
143
        $criteria->setSort($sort);
144
        $criteria->setOrder($order);
145
        $morefiles = Modulebuilder\Helper::getInstance()->getHandler('Morefiles')->getObjects($criteria);
146
        unset($criteria);
147
148
        return $morefiles;
149
    }
150
}
151