Issues (411)

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/ObjectTree.php (2 issues)

1
<?php
2
3
namespace XoopsModules\Wfdownloads;
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
 * WfdownloadsObjectTree
17
 *
18
 * @copyright   XOOPS Project (https://xoops.org)
19
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
20
 * @author      lucio <[email protected]>
21
 * @package     Wfdownloads
22
 * @since       3.23
23
 */
24
25
use XoopsModules\Wfdownloads;
26
27
//xoops_load('XoopsObjectTree');
28
require_once XOOPS_ROOT_PATH . '/class/tree.php';
29
30
/**
31
 * Form element that ...
32
 */
33
class ObjectTree extends \XoopsObjectTree
34
{
35
    /**
36
     * Make options for a select box from
37
     *
38
     * @param string $fieldName    Name of the member variable from the node objects that should be used as the title for the options.
39
     * @param int    $key          ID of the object to display as the root of select options
40
     * @param string $optionsArray (reference to a string when called from outside) Result from previous recursions
41
     * @param string $prefix_orig  String to indent items at deeper levels
42
     * @param string $prefix_curr  String to indent the current item
43
     *
44
     * @return string
45
     * @access private
46
     */
47
    public function makeSelBoxOptionsArray($fieldName, $key, &$optionsArray, $prefix_orig, $prefix_curr = '')
48
    {
49
        if ($key > 0) {
50
            $value                = $this->tree[$key]['obj']->getVar($this->_myId);
0 ignored issues
show
Bug Best Practice introduced by
The property _myId does not exist on XoopsModules\Wfdownloads\ObjectTree. Since you implemented __get, consider adding a @property annotation.
Loading history...
51
            $optionsArray[$value] = $prefix_curr . $this->tree[$key]['obj']->getVar($fieldName);
52
            $prefix_curr          .= $prefix_orig;
53
        }
54
        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
55
            foreach ($this->tree[$key]['child'] as $childkey) {
56
                $this->makeSelBoxOptionsArray($fieldName, $childkey, $optionsArray, $prefix_orig, $prefix_curr);
57
            }
58
        }
59
60
        return $optionsArray;
61
    }
62
63
    /**
64
     * Make a select box with options from the tree
65
     *
66
     * @param string $name
67
     * @param string $fieldName       Name of the member variable from the node objects that should be used as the title for the options.
68
     * @param string $prefix          String to indent deeper levels
69
     * @param string $selected
70
     * @param bool   $addEmptyOption  Set TRUE to add an empty option with value "0" at the top of the hierarchy
71
     * @param int    $key             ID of the object to display as the root of select options
72
     *
73
     * @param string $extra
74
     * @return string $optionsArray   Associative array of value->name pairs, useful for <a href='psi_element://XoopsFormSelect'>XoopsFormSelect</a>->addOptionArray method
75
     *                                addOptionArray method
76
     */
77
    public function makeSelBox($name, $fieldName, $prefix = '-', $selected = '', $addEmptyOption = false, $key = 0, $extra = '')
78
        //    public function makeSelBox($fieldName, $prefix = '-', $addEmptyOption = false, $key = 0)
79
    {
80
        $optionsArray = [];
81
        if ($addEmptyOption) {
82
            $optionsArray[0] = '';
83
        }
84
85
        return $this->makeSelBoxOptionsArray($fieldName, $key, $optionsArray, $prefix);
0 ignored issues
show
$optionsArray of type array is incompatible with the type string expected by parameter $optionsArray of XoopsModules\Wfdownloads...akeSelBoxOptionsArray(). ( Ignorable by Annotation )

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

85
        return $this->makeSelBoxOptionsArray($fieldName, $key, /** @scrutinizer ignore-type */ $optionsArray, $prefix);
Loading history...
86
    }
87
}
88