Issues (992)

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.

include/functions0.php (3 issues)

1
<?php
2
3
/**
4
 * ExtGallery functions
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
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
 *
13
 * @copyright   {@link https://xoops.org/ XOOPS Project}
14
 * @license     GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
15
 * @author      Zoullou (http://www.zoullou.net)
16
 * @package     ExtGallery
17
 * @param $option
18
 * @return bool
19
 */
20
function gal_getmoduleoption($option)
21
{
22
    global $xoopsModuleConfig, $xoopsModule;
23
    static $tbloptions = [];
24
    if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
25
        return $tbloptions[$option];
26
    }
27
28
    $retval = false;
29
    if (isset($xoopsModuleConfig)
30
        && (is_object($xoopsModule) && 'extgallery' === $xoopsModule->getVar('dirname')
31
            && $xoopsModule->getVar('isactive'))) {
32
        if (isset($xoopsModuleConfig[$option])) {
33
            $retval = $xoopsModuleConfig[$option];
34
        }
35
    } else {
36
        /** @var \XoopsModuleHandler $moduleHandler */
37
        $moduleHandler = xoops_getHandler('module');
38
        $module        = $moduleHandler->getByDirname('extgallery');
39
40
        /** @var \XoopsModuleHandler $moduleHandler */
41
        /** @var \XoopsConfigHandler $configHandler */
42
        $configHandler = xoops_getHandler('config');
43
        if ($module) {
44
            $moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
45
            if (isset($moduleConfig[$option])) {
46
                $retval = $moduleConfig[$option];
47
            }
48
        }
49
    }
50
    $tbloptions[$option] = $retval;
51
52
    return $retval;
53
}
54
55
/**
56
 * @param $caption
57
 * @param $name
58
 * @param $value
59
 * @param $rows
60
 * @param $cols
61
 * @param $width
62
 * @param $height
63
 * @param $supplemental
64
 *
65
 * @return bool|\XoopsFormEditor
66
 */
67
function gal_getWysiwygForm($caption, $name, $value, $rows, $cols, $width, $height, $supplemental)
0 ignored issues
show
The parameter $supplemental is not used and could be removed. ( Ignorable by Annotation )

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

67
function gal_getWysiwygForm($caption, $name, $value, $rows, $cols, $width, $height, /** @scrutinizer ignore-unused */ $supplemental)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
68
{
69
    $editor_option            = mb_strtolower(gal_getmoduleoption('form_options'));
0 ignored issues
show
gal_getmoduleoption('form_options') of type boolean is incompatible with the type string expected by parameter $string of mb_strtolower(). ( Ignorable by Annotation )

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

69
    $editor_option            = mb_strtolower(/** @scrutinizer ignore-type */ gal_getmoduleoption('form_options'));
Loading history...
70
    $editor                   = false;
0 ignored issues
show
The assignment to $editor is dead and can be removed.
Loading history...
71
    $editor_configs           = [];
72
    $editor_configs['name']   = $name;
73
    $editor_configs['value']  = $value;
74
    $editor_configs['rows']   = $rows;
75
    $editor_configs['cols']   = $cols;
76
    $editor_configs['width']  = $width;
77
    $editor_configs['height'] = $height;
78
    $editor_configs['editor'] = $editor_option;
79
80
    $editor = new \XoopsFormEditor($caption, $name, $editor_configs);
81
82
    return $editor;
83
}
84