Issues (432)

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

Labels
Severity
1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Suico\Form;
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
 * @category        Module
17
 * @copyright       {@link https://xoops.org/ XOOPS Project}
18
 * @license         GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
19
 * @author          Marcello Brandão aka  Suico, Mamba, LioMJ  <https://xoops.org>
20
 */
21
22
use Xmf\Module\Helper\Permission;
23
use XoopsFormButton;
24
use XoopsFormHidden;
25
use XoopsFormLabel;
26
use XoopsFormSelectUser;
27
use XoopsFormText;
28
use XoopsFormTextArea;
29
use XoopsModules\Suico;
30
use XoopsThemeForm;
31
32
require_once \dirname(__DIR__, 2) . '/include/common.php';
33
$moduleDirName = \basename(\dirname(__DIR__, 2));
34
//$helper = Suico\Helper::getInstance();
35
$permHelper = new Permission();
36
\xoops_load('XoopsFormLoader');
37
38
/**
39
 * Class VideoForm
40
 */
41
class VideoForm extends XoopsThemeForm
42
{
43
    public $targetObject;
44
    public $helper;
45
46
    /**
47
     * Constructor
48
     *
49
     * @param $target
50
     */
51
    public function __construct($target)
52
    {
53
        $this->helper       = $target->helper;
54
        $this->targetObject = $target;
55
        $title              = $this->targetObject->isNew() ? \AM_SUICO_VIDEO_ADD : \AM_SUICO_VIDEO_EDIT;
56
        parent::__construct($title, 'form', \xoops_getenv('SCRIPT_NAME'), 'post', true);
57
        $this->setExtra('enctype="multipart/form-data"');
58
        //include ID field, it's needed so the module knows if it is a new form or an edited form
59
        $hidden = new XoopsFormHidden(
60
            'video_id',
61
            $this->targetObject->getVar(
62
                'video_id'
63
            )
64
        );
65
        $this->addElement($hidden);
66
        unset($hidden);
67
        // Video_id
68
        $this->addElement(
69
            new XoopsFormLabel(\AM_SUICO_VIDEO_VIDEO_ID, $this->targetObject->getVar('video_id'), 'video_id')
70
        );
71
        // Uid_owner
72
        $this->addElement(
73
            new XoopsFormSelectUser(
74
                \AM_SUICO_VIDEO_UID_OWNER,
75
                'uid_owner',
76
                false,
77
                $this->targetObject->getVar(
78
                    'uid_owner'
79
                ),
80
                1,
81
                false
82
            ),
83
            false
84
        );
85
        // Video Title
86
        $this->addElement(
87
            new XoopsFormText(
88
                \AM_SUICO_VIDEO_TITLE,
89
                'video_title',
90
                50,
91
                255,
92
                $this->targetObject->getVar(
93
                    'video_title'
94
                )
95
            ),
96
            false
97
        );
98
        // Video_desc
99
        $this->addElement(
100
            new XoopsFormTextArea(
101
                \AM_SUICO_VIDEO_VIDEO_DESC,
102
                'video_desc',
103
                $this->targetObject->getVar(
104
                    'video_desc'
105
                ),
106
                4,
107
                47
108
            ),
109
            false
110
        );
111
        // Youtube_code
112
        $this->addElement(
113
            new XoopsFormText(
114
                \AM_SUICO_VIDEO_YOUTUBE_CODE,
115
                'youtube_code',
116
                50,
117
                255,
118
                $this->targetObject->getVar(
119
                    'youtube_code'
120
                )
121
            ),
122
            false
123
        );
124
        // Main_video
125
        $this->addElement(
126
            new XoopsFormText(
127
                \AM_SUICO_VIDEO_MAIN_VIDEO,
128
                'featured_video',
129
                50,
130
                255,
131
                $this->targetObject->getVar(
132
                    'featured_video'
133
                )
134
            ),
135
            false
136
        );
137
        // Data_creation
138
        $this->addElement(new \XoopsFormTextDateSelect(\AM_SUICO_VIDEO_DATE_CREATED, 'date_created', 0, \formatTimestamp($this->targetObject->getVar('date_created'), 's')));
0 ignored issues
show
formatTimestamp($this->t...r('date_created'), 's') of type string is incompatible with the type integer expected by parameter $value of XoopsFormTextDateSelect::__construct(). ( Ignorable by Annotation )

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

138
        $this->addElement(new \XoopsFormTextDateSelect(\AM_SUICO_VIDEO_DATE_CREATED, 'date_created', 0, /** @scrutinizer ignore-type */ \formatTimestamp($this->targetObject->getVar('date_created'), 's')));
Loading history...
139
        $this->addElement(
140
            new \XoopsFormTextDateSelect(
141
                \AM_SUICO_VIDEO_DATE_UPDATED,
142
                'date_updated',
143
                0,
144
                \formatTimestamp($this->targetObject->getVar('date_updated'), 's')
145
            )
146
        );
147
        $this->addElement(new XoopsFormHidden('op', 'save'));
148
        $this->addElement(new XoopsFormButton('', 'submit', \_SUBMIT, 'submit'));
149
    }
150
}
151