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/StepForm.php (5 issues)

1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Suico\Form;
4
5
use XoopsFormButton;
6
use XoopsFormHidden;
7
use XoopsModules\Suico\Regstep;
8
use XoopsThemeForm;
9
10
/**
11
 * @param Regstep $step {@link Regstep} to edit
12
 * @param bool    $action
13
 */
14
class StepForm extends XoopsThemeForm
15
{
16
    /**
17
     * StepForm constructor.
18
     * @param bool $action
19
     */
20
    public function __construct(Regstep $step = null, $action = false)
21
    {
22
        if (!$action) {
23
            $action = $_SERVER['REQUEST_URI'];
0 ignored issues
show
The assignment to $action is dead and can be removed.
Loading history...
24
        }
25
        if (empty($GLOBALS['xoopsConfigUser'])) {
26
            /** @var \XoopsConfigHandler $configHandler */
27
            $configHandler              = \xoops_getHandler('config');
28
            $GLOBALS['xoopsConfigUser'] = $configHandler->getConfigsByCat(\XOOPS_CONF_USER);
29
        }
30
        require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
31
        parent::__construct(\_AM_SUICO_STEP, 'stepform', 'step.php', 'post', true);
32
        if (!$step->isNew()) {
0 ignored issues
show
The method isNew() does not exist on null. ( Ignorable by Annotation )

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

32
        if (!$step->/** @scrutinizer ignore-call */ isNew()) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
33
            $this->addElement(new XoopsFormHidden('id', $step->getVar('step_id')));
0 ignored issues
show
It seems like $step->getVar('step_id') can also be of type array and array; however, parameter $value of XoopsFormHidden::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

33
            $this->addElement(new XoopsFormHidden('id', /** @scrutinizer ignore-type */ $step->getVar('step_id')));
Loading history...
34
        }
35
        $this->addElement(new XoopsFormHidden('op', 'save'));
36
        $this->addElement(new \XoopsFormText(\_AM_SUICO_STEPNAME, 'step_name', 25, 255, $step->getVar('step_name', 'e')));
0 ignored issues
show
It seems like $step->getVar('step_name', 'e') can also be of type array and array; however, parameter $value of XoopsFormText::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

36
        $this->addElement(new \XoopsFormText(\_AM_SUICO_STEPNAME, 'step_name', 25, 255, /** @scrutinizer ignore-type */ $step->getVar('step_name', 'e')));
Loading history...
37
        $this->addElement(new \XoopsFormText(\_AM_SUICO_STEPINTRO, 'step_desc', 25, 255, $step->getVar('step_desc', 'e')));
38
        $this->addElement(new \XoopsFormText(\_AM_SUICO_STEPORDER, 'step_order', 10, 10, $step->getVar('step_order', 'e')));
39
        $this->addElement(new \XoopsFormRadioYN(\_AM_SUICO_STEPSAVE, 'step_save', $step->getVar('step_save', 'e')));
0 ignored issues
show
It seems like $step->getVar('step_save', 'e') can also be of type array and array; however, parameter $value of XoopsFormRadioYN::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

39
        $this->addElement(new \XoopsFormRadioYN(\_AM_SUICO_STEPSAVE, 'step_save', /** @scrutinizer ignore-type */ $step->getVar('step_save', 'e')));
Loading history...
40
        $this->addElement(new XoopsFormButton('', 'submit', \_SUBMIT, 'submit'));
41
    }
42
}
43