Issues (1844)

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/MailBox.php (11 issues)

1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Xhelp;
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
 * @copyright    {@link https://xoops.org/ XOOPS Project}
17
 * @license      {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
18
 * @author       Nazar Aziz <[email protected]>
19
 * @author       XOOPS Development Team
20
 */
21
22
\define('_XHELP_MAILBOXTYPE_POP3', 1);
23
\define('_XHELP_MAILBOXTYPE_IMAP', 2);
24
25
/**
26
 * Xhelp\MailBox class
27
 *
28
 * Part of the email submission subsystem. Abstract class defining functions
29
 * needed to interact with a mailstore
30
 * @abstract
31
 */
32
abstract class MailBox
33
{
34
    /**
35
     * @param string $server
36
     * @param int    $port
37
     */
38
    public function connect(string $server, int $port = 110): bool
0 ignored issues
show
The parameter $server 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

38
    public function connect(/** @scrutinizer ignore-unused */ string $server, int $port = 110): bool

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...
The parameter $port 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

38
    public function connect(string $server, /** @scrutinizer ignore-unused */ int $port = 110): bool

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...
39
    {
40
    }
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return boolean. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
41
42
    /**
43
     * @param string $username
44
     * @param string $password
45
     */
46
    public function login(string $username, string $password): bool
0 ignored issues
show
The parameter $username 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

46
    public function login(/** @scrutinizer ignore-unused */ string $username, string $password): bool

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...
The parameter $password 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

46
    public function login(string $username, /** @scrutinizer ignore-unused */ string $password): bool

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...
47
    {
48
    }
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return boolean. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
49
50
    public function messageCount(): int
51
    {
52
    }
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return integer. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
53
54
    /**
55
     * @param int $i
56
     */
57
    public function getHeaders(int $i)
0 ignored issues
show
The parameter $i 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

57
    public function getHeaders(/** @scrutinizer ignore-unused */ int $i)

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...
58
    {
59
    }
60
61
    /**
62
     * @param int $i
63
     */
64
    public function getBody(int $i)
0 ignored issues
show
The parameter $i 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

64
    public function getBody(/** @scrutinizer ignore-unused */ int $i)

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...
65
    {
66
    }
67
68
    /**
69
     * @param int $i
70
     */
71
    public function getMsg(int $i)
0 ignored issues
show
The parameter $i 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

71
    public function getMsg(/** @scrutinizer ignore-unused */ int $i)

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...
72
    {
73
    }
74
75
    /**
76
     * @param int $i
77
     */
78
    public function deleteMessage(int $i)
0 ignored issues
show
The parameter $i 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

78
    public function deleteMessage(/** @scrutinizer ignore-unused */ int $i)

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...
79
    {
80
    }
81
82
    public function disconnect()
83
    {
84
    }
85
}
86