Issues (407)

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/friends_block.php (4 issues)

1
<?php
2
3
declare(strict_types=1);
4
/*
5
 You may not change or alter any portion of this comment or credits
6
 of supporting developers from this source code or any supporting source code
7
 which is considered copyrighted (c) material of the original comment or credit authors.
8
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
14
/**
15
 * @category        Module
16
 * @package         suico
17
 * @copyright       {@link https://xoops.org/ XOOPS Project}
18
 * @license         GNU GPL 2 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 XoopsModules\Suico\{
23
    Helper
24
};
25
/** @var Helper $helper */
26
27
if (!defined('XOOPS_ROOT_PATH')) {
28
    exit();
29
}
30
//include_once(XOOPS_ROOT_PATH."/class/criteria.php");
31
//require_once XOOPS_ROOT_PATH . '/modules/suico/class/Friendship.php';
32
/**
33
 * @param $options
34
 * @return array
35
 */
36
function b_suico_friends_show($options)
37
{
38
    global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser;
39
40
    /** @var Helper $helper */
41
    if (!class_exists(Helper::class)) {
42
        return false;
0 ignored issues
show
Bug Best Practice introduced by
The expression return false returns the type false which is incompatible with the documented return type array.
Loading history...
43
    }
44
45
    $helper = Helper::getInstance();
46
    $helper->loadLanguage('main');
47
48
    $myts  = \MyTextSanitizer::getInstance();
0 ignored issues
show
The assignment to $myts is dead and can be removed.
Loading history...
49
    $block = [];
50
    if ($xoopsUser) {
51
        /**
52
         * Filter for fetch votes ishot and isnothot
53
         */
54
        $criteria2 = new Criteria(
55
            'friend1_uid', $xoopsUser->getVar(
56
            'uid'
57
        )
58
        );
59
        /**
60
         * Creating factories of pictures and votes
61
         */
62
        //$albumFactory      = new ImagesHandler($xoopsDB);
63
        $friendsFactory           = new \XoopsModules\Suico\FriendshipHandler($xoopsDB);
64
        $block['friends']         = $friendsFactory->getFriends($options[0], $criteria2);
65
        $block['lang_allfriends'] = _MB_SUICO_ALLFRIENDS;
66
        $block['lang_nofriends']  = _MB_SUICO_NOFRIENDSYET;
67
        $block['enablepm']        = $options[1] ?? '';
68
        return $block;
69
    }
70
}
71
72
/**
73
 * @param array $options
74
 * @return string
75
 */
76
function b_suico_friends_edit($options)
77
{
78
    $form .= _MB_SUICO_TOTALFRIENDSTOSHOW . '&nbsp;';
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $form seems to be never defined.
Loading history...
79
    $form .= "<input type='text' name='options[0]' value='" . $options[0] . "'><br>";
80
    $form .= _MB_SUICO_ENABLEPM . '&nbsp;';
81
    if (isset($options[1]) && 1 === $options[1]) {
82
        $chk = ' checked';
83
    }
84
    $form .= "<input type='radio' name='options[1]' value='1'" . $chk . '>&nbsp;' . _YES . '';
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $chk does not seem to be defined for all execution paths leading up to this point.
Loading history...
85
    $chk  = '';
86
    if (!isset($options[1]) || 0 === $options[1]) {
87
        $chk = ' checked';
88
    }
89
    $form .= "&nbsp;<input type='radio' name='options[1]' value='0'" . $chk . '>' . _NO . '<br>';
90
    return $form;
91
}
92