Issues (267)

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.

blocks/xoopstube_banner.php (5 issues)

1
<?php
2
/**
3
 * XoopsTube - a multicategory video management module
4
 *
5
 * Based upon WF-Links
6
 *
7
 * File: blocks/xoopstube_banner.php
8
 *
9
 * @copyright        https://xoops.org/ XOOPS Project
10
 * @copyright        XOOPS_copyrights.txt
11
 * @copyright        http://www.impresscms.org/ The ImpressCMS Project
12
 * @license          GNU General Public License (GPL)
13
 *                   a copy of the GNU license is enclosed.
14
 * ----------------------------------------------------------------------------------------------------------
15
 * @package          XoopsTube
16
 * @since            1.00
17
 * @author           McDonald
18
 *
19
 * @param $options
20
 *
21
 * @return array
22
 */
23
24
use XoopsModules\Xoopstube;
25
26
/**
27
 * @param $options
28
 * @return array
29
 */
30
function xtubeShowBannerB($options)
0 ignored issues
show
The parameter $options 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

30
function xtubeShowBannerB(/** @scrutinizer ignore-unused */ $options)

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...
31
{
32
    $moduleDirName = \basename(\dirname(__DIR__));
33
34
    $block = [];
35
    $time  = time();
0 ignored issues
show
The assignment to $time is dead and can be removed.
Loading history...
36
    /** @var \XoopsModuleHandler $moduleHandler */
37
    $moduleHandler   = xoops_getHandler('module');
38
    $xoopstubeModule = $moduleHandler->getByDirname($moduleDirName);
39
    /** @var \XoopsConfigHandler $configHandler */
40
    $configHandler         = xoops_getHandler('config');
41
    $xoopstubeModuleConfig = $configHandler->getConfigsByCat(0, $xoopstubeModule->getVar('mid'));
0 ignored issues
show
The assignment to $xoopstubeModuleConfig is dead and can be removed.
Loading history...
42
43
    $result = $GLOBALS['xoopsDB']->query(
44
        'SELECT a.cid AS acid, a.title, a.client_id, a.banner_id, b.bid, b.cid, b.imptotal, b.impmade, b.clicks FROM '
45
        . $GLOBALS['xoopsDB']->prefix('xoopstube_cat')
46
        . ' a, '
47
        . $GLOBALS['xoopsDB']->prefix('banner')
48
        . ' b WHERE (b.cid = a.client_id) OR (b.bid = a.banner_id) ORDER BY b.cid, b.bid, a.title ASC'
49
    );
50
51
    while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) {
52
        $impmade    = $myrow['impmade'];
53
        $clicks     = $myrow['clicks'];
54
        $imptotal   = $myrow['imptotal'];
55
        $bannerload = [];
56
        $result2    = $GLOBALS['xoopsDB']->query('SELECT name FROM ' . $GLOBALS['xoopsDB']->prefix('bannerclient') . ' WHERE cid=' . (int)$myrow['cid']);
57
        $myclient   = $GLOBALS['xoopsDB']->fetchArray($result2);
58
        if (0 == $impmade) {
59
            $percent = 0;
60
        } else {
61
            $percent = mb_substr(100 * $clicks / $impmade, 0, 5);
62
        }
63
        if (0 == $imptotal) {
64
            $left = 'Unlimited';
65
        } else {
66
            $left = (int)$imptotal - (int)$impmade;
67
        }
68
        $bannerload['cat']      = (int)$myrow['acid'];
69
        $bannerload['bid']      = (int)$myrow['bid'];
70
        $bannerload['cid']      = (int)$myrow['cid'];
71
        $bannerload['imptotal'] = (int)$myrow['imptotal'];
72
        $bannerload['impmade']  = (int)$myrow['impmade'];
73
        $bannerload['impleft']  = $left;
74
        $bannerload['clicks']   = (int)$myrow['clicks'];
75
        $bannerload['client']   = $myclient['name'];
76
        $bannerload['percent']  = $percent;
77
        $bannerload['cattitle'] = $myrow['title'];
78
        $bannerload['dirname']  = $xoopstubeModule->getVar('dirname');
79
        $block['banners'][]     = $bannerload;
80
    }
81
    unset($_block_check_array);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $_block_check_array seems to be never defined.
Loading history...
82
83
    return $block;
84
}
85
86
/**
87
 * @param $options
88
 *
89
 * @return string
90
 */
91
function xtubeEditBannerB($options)
0 ignored issues
show
The parameter $options 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

91
function xtubeEditBannerB(/** @scrutinizer ignore-unused */ $options)

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...
92
{
93
    $form = '';
94
95
    return $form;
96
}
97