Issues (30)

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.

Document/History.php (4 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
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\TranslationsBundle\Document;
13
14
use ONGR\ElasticsearchBundle\Annotation as ES;
15
16
/**
17
 * Holds translations history.
18
 *
19
 * @ES\Document(type="history")
20
 */
21
class History extends Translation implements \JsonSerializable
22
{
23
    /**
24
     * @var string
25
     *
26
     * @ES\Id()
27
     */
28
    private $id;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
29
30
    /**
31
     * @var string
32
     *
33
     * @ES\Property(type="keyword")
34
     */
35
    private $key;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
36
37
    /**
38
     * @var string
39
     *
40
     * @ES\Property(type="keyword")
41
     */
42
    private $locale;
43
44
    /**
45
     * @var string
46
     *
47
     * @ES\Property(type="text")
48
     */
49
    private $message;
50
51
    /**
52
     * @var string
53
     *
54
     * @ES\Property(type="keyword")
55
     */
56
    private $domain;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
57
58
    /**
59
     * @var \DateTime
60
     *
61
     * @ES\Property(type="date")
62
     */
63
    private $updatedAt;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
64
65
    /**
66
     * Sets document ID.
67
     *
68
     * @param string $id
69
     *
70
     * @return $this
71
     */
72
    public function setId($id)
73
    {
74
        $this->id = $id;
75
76
        return $this;
77
    }
78
79
    /**
80
     * Returns document ID.
81
     *
82
     * @return string
83
     */
84
    public function getId()
85
    {
86
        return $this->id;
87
    }
88
89
    /**
90
     * @param string $key
91
     *
92
     * @return History
93
     */
94
    public function setKey($key)
95
    {
96
        $this->key = $key;
97
        return $this;
98
    }
99
100
    /**
101
     * @return string
102
     */
103
    public function getKey()
104
    {
105
        return $this->key;
106
    }
107
108
    /**
109
     * @param string $locale
110
     *
111
     * @return History
112
     */
113
    public function setLocale($locale)
114
    {
115
        $this->locale = $locale;
116
117
        return $this;
118
    }
119
120
    /**
121
     * @return string
122
     */
123
    public function getLocale()
124
    {
125
        return $this->locale;
126
    }
127
128
    /**
129
     * @param string $message
130
     *
131
     * @return History
132
     */
133
    public function setMessage($message)
134
    {
135
        $this->message = $message;
136
137
        return $this;
138
    }
139
140
    /**
141
     * @return string
142
     */
143
    public function getMessage()
144
    {
145
        return $this->message;
146
    }
147
148
    /**
149
     * @param string $domain
150
     *
151
     * @return History
152
     */
153
    public function setDomain($domain)
154
    {
155
        $this->domain = $domain;
156
        return $this;
157
    }
158
159
    /**
160
     * @return string
161
     */
162
    public function getDomain()
163
    {
164
        return $this->domain;
165
    }
166
167
    /**
168
     * @return \DateTime
169
     */
170
    public function getUpdatedAt()
171
    {
172
        return $this->updatedAt;
173
    }
174
175
    /**
176
     * @param \DateTime $updatedAt
177
     */
178
    public function setUpdatedAt($updatedAt)
179
    {
180
        $this->updatedAt = $updatedAt;
181
    }
182
183
    /**
184
     * {@inheritdoc}
185
     */
186
    public function jsonSerialize()
187
    {
188
        return [
189
            'id' => $this->getId(),
190
            'message' => $this->getMessage(),
191
            'key' => $this->getKey(),
192
            'domain' => $this->getDomain(),
193
            'locale' => $this->getLocale(),
194
            'updatedAt' => $this->getUpdatedAt()->format('Y-m-d H:i:s'),
195
        ];
196
    }
197
}
198