Issues (23)

Security Analysis    not enabled

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.

Entity/Media.php (4 issues)

Labels
Severity

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
namespace Alpixel\Bundle\MediaBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Gedmo\Mapping\Annotation as Gedmo;
7
8
/**
9
 * Media.
10
 *
11
 * @ORM\Table(name="media")
12
 * @ORM\Entity(repositoryClass="Alpixel\Bundle\MediaBundle\Repository\MediaRepository")
13
 */
14
class Media
15
{
16
    /**
17
     * @var int
18
     *
19
     * @ORM\Column(name="media_id", type="integer", nullable=false)
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="IDENTITY")
22
     */
23
    protected $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="name", type="string", length=191, nullable=false)
29
     */
30
    protected $name;
31
32
    /**
33
     * @var string
34
     *
35
     * @ORM\Column(name="uri", type="string", length=191, nullable=false, unique=true)
36
     */
37
    protected $uri;
38
39
    /**
40
     * @var string
41
     *
42
     * @ORM\Column(name="secret_key", type="string", length=64, nullable=false, unique=true)
43
     */
44
    protected $secretKey;
45
46
    /**
47
     * @var string
48
     *
49
     * @ORM\Column(name="mime", type="string", length=100, nullable=true)
50
     */
51
    protected $mime;
52
53
    /**
54
     * @var string
55
     *
56
     * @ORM\Column(name="lifetime", type="datetime", nullable=true)
57
     */
58
    protected $lifetime;
59
60
    /**
61
     * @var \DateTime
62
     *
63
     * @Gedmo\Timestampable(on="create")
64
     * @ORM\Column(name="date_created", type="datetime", nullable=false)
65
     */
66
    protected $dateCreated;
67
68
    /**
69
     * @var \DateTime
70
     * @Gedmo\Timestampable(on="update")
71
     * @ORM\Column(name="date_updated", type="datetime", nullable=false)
72
     */
73
    protected $dateUpdated;
74
75
    /**
76
     * @var string
77
     *
78
     * @Gedmo\IpTraceable(on="create")
79
     * @ORM\Column(length=45, nullable=true)
80
     */
81
    protected $createdFromIp;
82
83
    public function __construct()
84
    {
85
    }
86
87
    public function getFolder()
88
    {
89
        return str_replace(basename($this->uri), '', $this->uri);
90
    }
91
92
    /**
93
     * Gets the value of id.
94
     *
95
     * @return int
96
     */
97
    public function getId()
98
    {
99
        return $this->id;
100
    }
101
102
    /**
103
     * Sets the value of id.
104
     *
105
     * @param int $id the id
106
     *
107
     * @return self
108
     */
109
    public function setId($id)
110
    {
111
        $this->id = $id;
112
113
        return $this;
114
    }
115
116
    /**
117
     * Gets the value of name.
118
     *
119
     * @return string $name
120
     */
121
    public function getName()
122
    {
123
        return $this->name;
124
    }
125
126
    /**
127
     * Sets the value of name.
128
     *
129
     * @param string $name $name the name
130
     *
131
     * @return self
132
     */
133
    public function setName($name)
134
    {
135
        $this->name = $name;
136
137
        return $this;
138
    }
139
140
    /**
141
     * Gets the value of uri.
142
     *
143
     * @return string $name
144
     */
145
    public function getUri()
146
    {
147
        return $this->uri;
148
    }
149
150
    /**
151
     * Sets the value of uri.
152
     *
153
     * @param string $name $uri the uri
0 ignored issues
show
There is no parameter named $name. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
154
     *
155
     * @return self
156
     */
157
    public function setUri($uri)
158
    {
159
        $this->uri = $uri;
160
161
        return $this;
162
    }
163
164
    /**
165
     * Gets the value of secretKey.
166
     *
167
     * @return string $name
168
     */
169
    public function getSecretKey()
170
    {
171
        return $this->secretKey;
172
    }
173
174
    /**
175
     * Sets the value of secretKey.
176
     *
177
     * @param string $name $secretKey the secret key
0 ignored issues
show
There is no parameter named $name. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
178
     *
179
     * @return self
180
     */
181
    public function setSecretKey($secretKey)
182
    {
183
        $this->secretKey = $secretKey;
184
185
        return $this;
186
    }
187
188
    /**
189
     * Gets the value of mime.
190
     *
191
     * @return string $name
192
     */
193
    public function getMime()
194
    {
195
        return $this->mime;
196
    }
197
198
    /**
199
     * Sets the value of mime.
200
     *
201
     * @param string $name $mime the mime
0 ignored issues
show
There is no parameter named $name. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
202
     *
203
     * @return self
204
     */
205
    public function setMime($mime)
206
    {
207
        $this->mime = $mime;
208
209
        return $this;
210
    }
211
212
    /**
213
     * Gets the value of lifetime.
214
     *
215
     * @return string $label
216
     */
217
    public function getLifetime()
218
    {
219
        return $this->lifetime;
220
    }
221
222
    /**
223
     * Sets the value of lifetime.
224
     *
225
     * @param string $label $lifetime the lifetime
0 ignored issues
show
There is no parameter named $label. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
226
     *
227
     * @return self
228
     */
229
    public function setLifetime($lifetime)
230
    {
231
        $this->lifetime = $lifetime;
232
233
        return $this;
234
    }
235
236
    /**
237
     * Gets the value of dateCreated.
238
     *
239
     * @return \DateTime
240
     */
241
    public function getDateCreated()
242
    {
243
        return $this->dateCreated;
244
    }
245
246
    /**
247
     * Sets the value of dateCreated.
248
     *
249
     * @param \DateTime $dateCreated the date created
250
     *
251
     * @return self
252
     */
253
    public function setDateCreated(\DateTime $dateCreated)
254
    {
255
        $this->dateCreated = $dateCreated;
256
257
        return $this;
258
    }
259
260
    /**
261
     * Gets the value of dateUpdated.
262
     *
263
     * @return \DateTime
264
     */
265
    public function getDateUpdated()
266
    {
267
        return $this->dateUpdated;
268
    }
269
270
    /**
271
     * Sets the value of dateUpdated.
272
     *
273
     * @param \DateTime $dateUpdated the date updated
274
     *
275
     * @return self
276
     */
277
    public function setDateUpdated(\DateTime $dateUpdated)
278
    {
279
        $this->dateUpdated = $dateUpdated;
280
281
        return $this;
282
    }
283
284
    /**
285
     * Gets the value of createdFromIp.
286
     *
287
     * @return string $createdFromIp
288
     */
289
    public function getCreatedFromIp()
290
    {
291
        return $this->createdFromIp;
292
    }
293
294
    /**
295
     * Sets the value of createdFromIp.
296
     *
297
     * @param string $createdFromIp $createdFromIp the created from ip
298
     *
299
     * @return self
300
     */
301
    public function setCreatedFromIp($createdFromIp)
302
    {
303
        $this->createdFromIp = $createdFromIp;
304
305
        return $this;
306
    }
307
}
308