Issues (19)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  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.
  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.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
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.

src/Entity/GroupDetail.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
 * This file is part of the slince/smartqq package.
4
 *
5
 * (c) Slince <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Slince\SmartQQ\Entity;
12
13
use Slince\SmartQQ\EntityCollection;
14
15
class GroupDetail
16
{
17
    /**
18
     * 组id.
19
     *
20
     * @var int
21
     */
22
    protected $gid;
23
24
    /**
25
     * 群名称.
26
     *
27
     * @var string
28
     */
29
    protected $name;
30
31
    /**
32
     * code.
33
     *
34
     * @var string
35
     */
36
    protected $code;
37
38
    /**
39
     * 创建者的编号.
40
     *
41
     * @var int
42
     */
43
    protected $owner;
44
45
    /**
46
     * 群等级.
47
     *
48
     * @var int
49
     */
50
    protected $level;
51
52
    /**
53
     * 创建时间.
54
     *
55
     * @var int
56
     */
57
    protected $createTime;
58
59
    /**
60
     * flag.
61
     *
62
     * @var int
63
     */
64
    protected $flag;
65
66
    /**
67
     * 群公告.
68
     *
69
     * @var string
70
     */
71
    protected $memo;
72
73
    /**
74
     * @var EntityCollection
75
     */
76
    protected $members;
77
78
    /**
79
     * @return int
80
     */
81
    public function getGid()
82
    {
83
        return $this->gid;
84
    }
85
86
    /**
87
     * @param int $gid
88
     */
89
    public function setGid($gid)
90
    {
91
        $this->gid = $gid;
92
    }
93
94
    /**
95
     * @return string
96
     */
97
    public function getName()
98
    {
99
        return $this->name;
100
    }
101
102
    /**
103
     * @param string $name
104
     */
105
    public function setName($name)
106
    {
107
        $this->name = $name;
108
    }
109
110
    /**
111
     * @return string
112
     */
113
    public function getCode()
114
    {
115
        return $this->code;
116
    }
117
118
    /**
119
     * @param string $code
120
     */
121
    public function setCode($code)
122
    {
123
        $this->code = $code;
124
    }
125
126
    /**
127
     * @return int
128
     */
129
    public function getOwner()
130
    {
131
        return $this->owner;
132
    }
133
134
    /**
135
     * @param int $owner
136
     */
137
    public function setOwner($owner)
138
    {
139
        $this->owner = $owner;
140
    }
141
142
    /**
143
     * @return int
144
     */
145
    public function getLevel()
146
    {
147
        return $this->level;
148
    }
149
150
    /**
151
     * @param int $level
152
     */
153
    public function setLevel($level)
154
    {
155
        $this->level = $level;
156
    }
157
158
    /**
159
     * @return int
160
     */
161
    public function getCreateTime()
162
    {
163
        return $this->createTime;
164
    }
165
166
    /**
167
     * @param int $createTime
168
     */
169
    public function setCreateTime($createTime)
170
    {
171
        $this->createTime = $createTime;
172
    }
173
174
    /**
175
     * @return int
176
     */
177
    public function getFlag()
178
    {
179
        return $this->flag;
180
    }
181
182
    /**
183
     * @param int $flag
184
     */
185
    public function setFlag($flag)
186
    {
187
        $this->flag = $flag;
188
    }
189
190
    /**
191
     * @return string
192
     */
193
    public function getMemo()
194
    {
195
        return $this->memo;
196
    }
197
198
    /**
199
     * @param string $memo
200
     */
201
    public function setMemo($memo)
202
    {
203
        $this->memo = $memo;
204
    }
205
206
    /**
207
     * @return EntityCollection|GroupMember[]
208
     */
209
    public function getMembers()
210
    {
211
        return $this->members;
212
    }
213
214
    /**
215
     * @param EntityCollection|GroupMember[] $members
216
     */
217
    public function setMembers($members)
218
    {
219
        $this->members = $members;
0 ignored issues
show
Documentation Bug introduced by
It seems like $members can also be of type array<integer,object<Sli...QQ\Entity\GroupMember>>. However, the property $members is declared as type object<Slince\SmartQQ\EntityCollection>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
220
    }
221
}
222