Issues (3099)

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.

src/Kunstmaan/FormBundle/Entity/FormSubmission.php (2 issues)

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 Kunstmaan\FormBundle\Entity;
4
5
use DateTime;
6
use Doctrine\Common\Collections\ArrayCollection;
7
use Doctrine\ORM\Mapping as ORM;
8
use Kunstmaan\AdminBundle\Entity\EntityInterface;
9
use Kunstmaan\NodeBundle\Entity\Node;
10
11
/**
12
 * The form submission
13
 *
14
 * @ORM\Entity
15
 * @ORM\Table(name="kuma_form_submissions")
16
 * @ORM\HasLifecycleCallbacks()
17
 */
18
class FormSubmission implements EntityInterface
19
{
20
    /**
21
     * This id of the form submission
22
     *
23
     * @ORM\Id
24
     * @ORM\Column(type="bigint")
25
     * @ORM\GeneratedValue(strategy="AUTO")
26
     */
27
    protected $id;
28
29
    /**
30
     * The ip address which created this form submission
31
     *
32
     * @ORM\Column(type="string", name="ip_address")
33
     */
34
    protected $ipAddress;
35
36
    /**
37
     * Link to the node of the form which created this form submission
38
     *
39
     * @ORM\ManyToOne(targetEntity="Kunstmaan\NodeBundle\Entity\Node")
40
     * @ORM\JoinColumn(name="node_id", referencedColumnName="id")
41
     */
42
    protected $node;
43
44
    /**
45
     * The language of the form submission
46
     *
47
     * @ORM\Column(type="string")
48
     */
49
    protected $lang;
50
51
    /**
52
     * The date when the form submission was created
53
     *
54
     * @ORM\Column(type="datetime")
55
     */
56
    protected $created;
57
58
    /**
59
     * The extra fields with their value, which where configured on the form which created this submission
60
     *
61
     * @ORM\OneToMany(targetEntity="FormSubmissionField", mappedBy="formSubmission", cascade={"persist", "remove"})
62
     * @ORM\OrderBy({"sequence" = "ASC"})
63
     */
64
    protected $fields;
65
66
    /**
67
     * Constructor
68
     */
69 12
    public function __construct()
70
    {
71 12
        $this->fields = new ArrayCollection();
72 12
        $this->setCreated(new DateTime());
73 12
    }
74
75
    /**
76
     * Get id
77
     *
78
     * @return int
0 ignored issues
show
Should the return type not be string?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
79
     */
80 4
    public function getId()
81
    {
82 4
        return $this->id;
83
    }
84
85
    /**
86
     * Set id
87
     *
88
     * @param string $id
89
     *
90
     * @return FormSubmission
91
     */
92 3
    public function setId($id)
93
    {
94 3
        $this->id = $id;
95
96 3
        return $this;
97
    }
98
99
    /**
100
     * Get the ip address which submitted this form submission
101
     *
102
     * @return string
103
     */
104 1
    public function getIpAddress()
105
    {
106 1
        return $this->ipAddress;
107
    }
108
109
    /**
110
     * Set the ip address
111
     *
112
     * @param string $ipAddress
113
     *
114
     * @return FormSubmission
115
     */
116 1
    public function setIpAddress($ipAddress)
117
    {
118 1
        $this->ipAddress = $ipAddress;
119
120 1
        return $this;
121
    }
122
123
    /**
124
     * Get the node of the form which created this form submission
125
     *
126
     * @return Node
127
     */
128 1
    public function getNode()
129
    {
130 1
        return $this->node;
131
    }
132
133
    /**
134
     * Set the node of the form which created this form submission
135
     *
136
     * @param Node $node
137
     *
138
     * @return FormSubmission
139
     */
140 1
    public function setNode($node)
141
    {
142 1
        $this->node = $node;
143
144 1
        return $this;
145
    }
146
147
    /**
148
     * Sets the language of this form submission
149
     *
150
     * @param string $lang
151
     *
152
     * @return FormSubmission
153
     */
154 1
    public function setLang($lang)
155
    {
156 1
        $this->lang = $lang;
157
158 1
        return $this;
159
    }
160
161
    /**
162
     * Get the language of this form submission
163
     *
164
     * @return string
165
     */
166 2
    public function getLang()
167
    {
168 2
        return $this->lang;
169
    }
170
171
    /**
172
     * Set the date when the form submission was created
173
     *
174
     * @param datetime $created
175
     *
176
     * @return FormSubmission
177
     */
178 12
    public function setCreated($created)
179
    {
180 12
        $this->created = $created;
181
182 12
        return $this;
183
    }
184
185
    /**
186
     * Get the date when this form submission was created
187
     *
188
     * @return datetime
189
     */
190 2
    public function getCreated()
191
    {
192 2
        return $this->created;
193
    }
194
195
    /**
196
     * Returns the list of fields with their values
197
     *
198
     * @return FormSubmissionField[];
199
     */
200 2
    public function getFields()
201
    {
202 2
        return $this->fields;
203
    }
204
205
    /**
206
     * A string representation of this form submission
207
     *
208
     * @return string;
0 ignored issues
show
The doc-type string; could not be parsed: Expected "|" or "end of type", but got ";" at position 6. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
209
     */
210 1
    public function __toString()
211
    {
212 1
        return 'FormSubmission';
213
    }
214
}
215