Issues (519)

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 (2 issues)

Labels
Severity
1
<?php namespace XoopsModules\Tdmcreate\Files;
2
3
use XoopsModules\Tdmcreate;
4
use XoopsModules\Tdmcreate\Files;
5
6
/*
7
 You may not change or alter any portion of this comment or credits
8
 of supporting developers from this source code or any supporting source code
9
 which is considered copyrighted (c) material of the original comment or credit authors.
10
11
 This program is distributed in the hope that it will be useful,
12
 but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 */
15
/**
16
 * tdmcreate module.
17
 *
18
 * @copyright       XOOPS Project (https://xoops.org)
19
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
20
 *
21
 * @since           2.5.0
22
 *
23
 * @author          Txmod Xoops http://www.txmodxoops.org
24
 *
25
 * @version         $Id: TDMCreateTableFields.php 12258 2014-01-02 09:33:29Z timgno $
26
 */
27
28
/**
29
 * Class CreateTableFields
30
 */
31
class CreateTableFields extends  Files\CreateAbstractClass
32
{
33
    /**
34
     * @public   function constructor
35
     */
36
    public function __construct()
37
    {
38
    }
39
40
    /**
41
     * @static function getInstance
42
     *
43
     * @return bool|\TDMCreateTableFields
0 ignored issues
show
The type TDMCreateTableFields 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...
44
     */
45
    public static function getInstance()
46
    {
47
        static $instance = false;
48
        if (!$instance) {
49
            $instance = new self();
50
        }
51
52
        return $instance;
53
    }
54
55
    /**
56
     * @public function getTableTables
57
     *
58
     * @param        $mId
59
     *
60
     * @param string $sort
61
     * @param string $order
62
     * @return mixed
63
     */
64
    public function getTableTables($mId, $sort = 'table_id ASC, table_name', $order = 'ASC')
65
    {
66
        $criteria = new \CriteriaCompo();
67
        $criteria->add(new \Criteria('table_mid', $mId)); // $mId = module Id
68
        $criteria->setSort($sort);
69
        $criteria->setOrder($order);
70
        $tables = Tdmcreate\Helper::getInstance()->getHandler('tables')->getObjects($criteria);
0 ignored issues
show
The method getObjects() does not exist on XoopsObjectHandler. It seems like you code against a sub-type of said class. However, the method does not exist in XoopsRankHandler or XoUserHandler. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

70
        $tables = Tdmcreate\Helper::getInstance()->getHandler('tables')->/** @scrutinizer ignore-call */ getObjects($criteria);
Loading history...
71
        unset($criteria);
72
73
        return $tables;
74
    }
75
76
    /**
77
     * @public function getTableFields
78
     *
79
     * @param        $mId
80
     * @param        $tId
81
     *
82
     * @param string $sort
83
     * @param string $order
84
     * @return mixed
85
     */
86
    public function getTableFields($mId, $tId, $sort = 'field_id ASC, field_name', $order = 'ASC')
87
    {
88
        $criteria = new \CriteriaCompo();
89
        $criteria->add(new \Criteria('field_mid', $mId)); // $mId = module Id
90
        $criteria->add(new \Criteria('field_tid', $tId)); // $tId = table Id
91
        $criteria->setSort($sort);
92
        $criteria->setOrder($order);
93
        $fields = Tdmcreate\Helper::getInstance()->getHandler('fields')->getObjects($criteria);
94
        unset($criteria);
95
96
        return $fields;
97
    }
98
99
    /**
100
     * @public function getTableFieldElements
101
     *
102
     * @param        $mId
103
     * @param        $tId
104
     *
105
     * @param string $sort
106
     * @param string $order
107
     * @return mixed
108
     */
109
    public function getTableFieldElements($mId = null, $tId = null, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
110
    {
111
        $criteria = new \CriteriaCompo();
112
        if (null != $mId) {
113
            $criteria->add(new \Criteria('fieldelement_mid', $mId)); // $mId = module Id
114
            $criteria->setSort($sort);
115
            $criteria->setOrder($order);
116
        }
117
        if (null != $tId) {
118
            $criteria->add(new \Criteria('fieldelement_tid', $tId)); // $tId = table Id
119
            $criteria->setSort($sort);
120
            $criteria->setOrder($order);
121
        }
122
        $fieldElements = Tdmcreate\Helper::getInstance()->getHandler('fieldelements')->getObjects($criteria);
123
        unset($criteria);
124
125
        return $fieldElements;
126
    }
127
128
    /**
129
     * @public function getTableMoreFiles
130
     *
131
     * @param        $mId
132
     *
133
     * @param string $sort
134
     * @param string $order
135
     * @return mixed
136
     */
137
    public function getTableMoreFiles($mId, $sort = 'file_id ASC, file_name', $order = 'ASC')
138
    {
139
        $criteria = new \CriteriaCompo();
140
        $criteria->add(new \Criteria('file_mid', $mId)); // $mId = module Id
141
        $criteria->setSort($sort);
142
        $criteria->setOrder($order);
143
        $morefiles = Tdmcreate\Helper::getInstance()->getHandler('morefiles')->getObjects($criteria);
144
        unset($criteria);
145
146
        return $morefiles;
147
    }
148
}
149