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.

FormBundle/Entity/FormSubmissionField.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
namespace Kunstmaan\FormBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\DependencyInjection\ContainerInterface;
7
use Symfony\Component\Form\Form;
8
use Symfony\Component\Form\FormBuilderInterface;
9
use Symfony\Component\HttpFoundation\Request;
10
11
/**
12
 * The FormSubmissionField will hold the submitted values from the form page parts. The FormSubmissionFields
13
 * will be attached to a FormSubmission.
14
 *
15
 * @ORM\Entity
16
 * @ORM\Table(name="kuma_form_submission_fields")
17
 * @ORM\InheritanceType("SINGLE_TABLE")
18
 * @ORM\DiscriminatorColumn(name="discr", type="string")
19
 */
20
abstract class FormSubmissionField
21
{
22
    /**
23
     * This id of this FormSubmissionField
24
     *
25
     * @ORM\Id
26
     * @ORM\Column(type="bigint")
27
     * @ORM\GeneratedValue(strategy="AUTO")
28
     */
29
    protected $id;
30
31
    /**
32
     * The name of this FormSubmissionField
33
     *
34
     * @ORM\Column(type="string")
35
     */
36
    protected $fieldName;
37
38
    /**
39
     * The label used for this FormSubmissionField
40
     *
41
     * @ORM\Column(type="string")
42
     */
43
    protected $label;
44
45
    /**
46
     * The FormSubmission this field is part of
47
     *
48
     * @ORM\ManyToOne(targetEntity="FormSubmission", inversedBy="fields")
49
     * @ORM\JoinColumn(name="form_submission_id", referencedColumnName="id", onDelete="CASCADE")
50
     */
51
    protected $formSubmission;
52
53
    /**
54
     * @ORM\Column(type="integer", nullable=true)
55
     */
56
    protected $sequence;
57
58
    /**
59
     * The internal name of the form pagepart attached to this.
60
     *
61
     * @ORM\Column(name="internal_name", type="string", nullable=true)
62
     */
63
    protected $internalName;
64
65
    /**
66
     * Get id
67
     *
68
     * @return int
69
     */
70 1
    public function getId()
71
    {
72 1
        return $this->id;
73
    }
74
75
    /**
76
     * Set id
77
     *
78
     * @param string $id
79
     *
80
     * @return FormSubmissionField
81
     */
82 1
    public function setId($id)
83
    {
84 1
        $this->id = $id;
85
86 1
        return $this;
87
    }
88
89
    /**
90
     * Get the field name
91
     *
92
     * @return string
93
     */
94 2
    public function getFieldName()
95
    {
96 2
        return $this->fieldName;
97
    }
98
99
    /**
100
     * Set the field name
101
     *
102
     * @param string $fieldName
103
     *
104
     * @return FormSubmissionField
105
     */
106 10
    public function setFieldName($fieldName)
107
    {
108 10
        $this->fieldName = $fieldName;
109
110 10
        return $this;
111
    }
112
113
    /**
114
     * Get the label
115
     *
116
     * @return string
117
     */
118 2
    public function getLabel()
119
    {
120 2
        return $this->label;
121
    }
122
123
    /**
124
     * Set the label
125
     *
126
     * @param string $label
127
     *
128
     * @return FormSubmissionField
129
     */
130 7
    public function setLabel($label)
131
    {
132 7
        $this->label = $label;
133
134 7
        return $this;
135
    }
136
137
    /**
138
     * Get the FormSubmission this field is part of
139
     *
140
     * @return FormSubmission
141
     */
142 1
    public function getSubmission()
143
    {
144 1
        return $this->formSubmission;
145
    }
146
147
    /**
148
     * Set the FormSubmission this field is part of
149
     *
150
     * @param FormSubmission $formSubmission
151
     *
152
     * @return FormSubmissionField
153
     */
154 1
    public function setSubmission(FormSubmission $formSubmission)
155
    {
156 1
        $this->formSubmission = $formSubmission;
157
158 1
        return $this;
159
    }
160
161
    /**
162
     * Get sequence
163
     *
164
     * @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...
165
     */
166 2
    public function getSequence()
167
    {
168 2
        return $this->sequence;
169
    }
170
171
    /**
172
     * Set sequence
173
     *
174
     * @param string $sequence
175
     *
176
     * @return FormSubmissionField
177
     */
178 7
    public function setSequence($sequence)
179
    {
180 7
        $this->sequence = $sequence;
181
182 7
        return $this;
183
    }
184
185
    /**
186
     * @return mixed
187
     */
188
    public function getFormSubmission()
189
    {
190
        return $this->formSubmission;
191
    }
192
193
    /**
194
     * @param mixed $formSubmission
195
     */
196
    public function setFormSubmission($formSubmission)
197
    {
198
        $this->formSubmission = $formSubmission;
199
    }
200
201
    /**
202
     * @return mixed
203
     */
204
    public function getInternalName()
205
    {
206
        return $this->internalName;
207
    }
208
209
    /**
210
     * @param mixed $internalName
211
     */
212
    public function setInternalName($internalName)
213
    {
214
        $this->internalName = $internalName;
215
    }
216
217
    /**
218
     * Text representation of this field
219
     *
220
     * @return string
221
     */
222 1
    public function __toString()
223
    {
224 1
        return 'FormSubmission Field';
225
    }
226
227
    /**
228
     * This function will be triggered if the form was successfully posted.
229
     *
230
     * @param Form                 $form        the Form
231
     * @param FormBuilderInterface $formBuilder the FormBuilder
232
     * @param Request              $request     the Request
233
     * @param ContainerInterface   $container   the Container
234
     */
235
    public function onValidPost(Form $form, FormBuilderInterface $formBuilder, Request $request, ContainerInterface $container)
236
    {
237
        // do nothing by default
238
    }
239
}
240