Issues (127)

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/FavoriteHandler.php (3 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace XoopsModules\Wgfilemanager;
7
8
/*
9
 You may not change or alter any portion of this comment or credits
10
 of supporting developers from this source code or any supporting source code
11
 which is considered copyrighted (c) material of the original comment or credit authors.
12
13
 This program is distributed in the hope that it will be useful,
14
 but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
*/
17
18
/**
19
 * wgFileManager module for xoops
20
 *
21
 * @copyright    2021 XOOPS Project (https://xoops.org)
22
 * @license      GPL 2.0 or later
23
 * @package      wgfilemanager
24
 * @since        1.0
25
 * @min_xoops    2.5.9
26
 * @author       Goffy - Wedega - Email:[email protected] - Website:https://xoops.wedega.com
27
 */
28
29
use XoopsModules\Wgfilemanager;
30
31
32
/**
33
 * Class Object Handler Favorite
34
 */
35
class FavoriteHandler extends \XoopsPersistableObjectHandler
36
{
37
    /**
38
     * Constructor
39
     *
40
     * @param \XoopsDatabase $db
41
     */
42
    public function __construct(\XoopsDatabase $db)
43
    {
44
        parent::__construct($db, 'wgfilemanager_favorite', Favorite::class, 'id', 'extension');
45
    }
46
47
    /**
48
     * @param bool $isNew
49
     *
50
     * @return object
51
     */
52
    public function create($isNew = true)
53
    {
54
        return parent::create($isNew);
55
    }
56
57
    /**
58
     * retrieve a field
59
     *
60
     * @param int $id field id
61
     * @param null $fields fields
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $fields is correct as it would always require null to be passed?
Loading history...
62
     * @return \XoopsObject|null reference to the {@link Get} object
63
     */
64
    public function get($id = null, $fields = null)
65
    {
66
        return parent::get($id, $fields);
67
    }
68
69
    /**
70
     * Get Count File in the database
71
     * @param int    $start
72
     * @param int    $limit
73
     * @param string $sort
74
     * @param string $order
75
     * @return int
76
     */
77
    public function getCountFavorite($start = 0, $limit = 0, $sort = 'id', $order = 'ASC')
78
    {
79
        $crCountFavorite = new \CriteriaCompo();
80
        $crCountFavorite = $this->getFavoriteCriteria($crCountFavorite, $start, $limit, $sort, $order);
81
        return $this->getCount($crCountFavorite);
0 ignored issues
show
$crCountFavorite of type integer is incompatible with the type CriteriaElement|null expected by parameter $criteria of XoopsPersistableObjectHandler::getCount(). ( Ignorable by Annotation )

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

81
        return $this->getCount(/** @scrutinizer ignore-type */ $crCountFavorite);
Loading history...
82
    }
83
84
    /**
85
     * Get All Favorite in the database
86
     * @param int    $start
87
     * @param int    $limit
88
     * @param string $sort
89
     * @param string $order
90
     * @return array
91
     */
92
    public function getAllFavorite($start = 0, $limit = 0, $sort = 'id', $order = 'ASC')
93
    {
94
        $crAllFavorite = new \CriteriaCompo();
95
        $crAllFavorite = $this->getFavoriteCriteria($crAllFavorite, $start, $limit, $sort, $order);
96
        return $this->getAll($crAllFavorite);
0 ignored issues
show
$crAllFavorite of type integer is incompatible with the type CriteriaElement|null expected by parameter $criteria of XoopsPersistableObjectHandler::getAll(). ( Ignorable by Annotation )

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

96
        return $this->getAll(/** @scrutinizer ignore-type */ $crAllFavorite);
Loading history...
97
    }
98
99
    /**
100
     * Get Criteria Favorite
101
     * @param        $crFavorite
102
     * @param int    $start
103
     * @param int    $limit
104
     * @param string $sort
105
     * @param string $order
106
     * @return int
107
     */
108
    private function getFavoriteCriteria($crFavorite, $start, $limit, $sort, $order)
109
    {
110
        $crFavorite->setStart($start);
111
        $crFavorite->setLimit($limit);
112
        $crFavorite->setSort($sort);
113
        $crFavorite->setOrder($order);
114
        return $crFavorite;
115
    }
116
}
117