Issues (9)

Security Analysis    not enabled

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

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

1
<?php
2
3
/*
4
 * This file is part of the vseth-semesterly-reports project.
5
 *
6
 * (c) Florian Moser <[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 App\Entity;
13
14
use App\Entity\Base\BaseEntity;
15
use App\Entity\Traits\HideTrait;
16
use App\Entity\Traits\IdTrait;
17
use App\Entity\Traits\TimeTrait;
18
use DateTime;
19
use Doctrine\Common\Collections\ArrayCollection;
20
use Doctrine\ORM\Mapping as ORM;
21
use Ramsey\Uuid\Uuid;
22
23
/**
24
 * @ORM\Entity(repositoryClass="App\Repository\OrganisationRepository")
25
 * @ORM\HasLifecycleCallbacks
26
 */
27
class Organisation extends BaseEntity
28
{
29
    use IdTrait;
30
    use TimeTrait;
31
    use HideTrait;
32
33
    /**
34
     * @var string
35
     *
36
     * @ORM\Column(type="text")
37
     */
38
    private $name;
39
40
    /**
41
     * @var string
42
     *
43
     * @ORM\Column(type="text")
44
     */
45
    private $email;
46
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(type="integer")
51
     */
52
    private $relationSinceSemester;
53
54
    /**
55
     * @var string|null
56
     *
57
     * @ORM\Column(type="text", nullable=true)
58
     */
59
    private $comments;
60
61
    /**
62
     * @var string
63
     *
64
     * @ORM\Column(type="string")
65
     */
66
    private $authenticationCode;
67
68
    /**
69
     * @var DateTime|null
70
     *
71
     * @ORM\Column(type="datetime", nullable=true, options={"default": null})
72
     */
73
    private $lastVisitAt;
74
75
    /**
76
     * @var Event[]|ArrayCollection
77
     *
78
     * @ORM\OneToMany(targetEntity="Event", mappedBy="organisation")
79
     * @ORM\OrderBy({"semester" = "DESC", "startDate" = "DESC", "endDate" = "DESC"})
80
     */
81
    private $events;
82
83
    /**
84
     * @var SemesterReport[]|ArrayCollection
85
     *
86
     * @ORM\OneToMany(targetEntity="SemesterReport", mappedBy="organisation")
87
     * @ORM\OrderBy({"semester" = "DESC"})
88
     */
89
    private $semesterReports;
90
91
    public function __construct()
92
    {
93
        $this->events = new ArrayCollection();
94
        $this->semesterReports = new ArrayCollection();
95
    }
96
97
    public function getName(): string
98
    {
99
        return $this->name;
100
    }
101
102
    public function setName(string $name): void
103
    {
104
        $this->name = $name;
105
    }
106
107
    public function getEmail(): string
108
    {
109
        return $this->email;
110
    }
111
112
    public function setEmail(string $email): void
113
    {
114
        $this->email = $email;
115
    }
116
117
    public function getRelationSinceSemester(): int
118
    {
119
        return $this->relationSinceSemester;
120
    }
121
122
    public function setRelationSinceSemester(int $relationSinceSemester): void
123
    {
124
        $this->relationSinceSemester = $relationSinceSemester;
125
    }
126
127
    public function getAuthenticationCode(): string
128
    {
129
        return $this->authenticationCode;
130
    }
131
132
    public function getComments(): ?string
133
    {
134
        return $this->comments;
135
    }
136
137
    public function setComments(?string $comments): void
138
    {
139
        $this->comments = $comments;
140
    }
141
142
    /**
143
     * @throws \Exception
144
     */
145
    public function generateAuthenticationCode()
146
    {
147
        $this->authenticationCode = Uuid::uuid4();
0 ignored issues
show
Documentation Bug introduced by
It seems like Ramsey\Uuid\Uuid::uuid4() of type Ramsey\Uuid\UuidInterface is incompatible with the declared type string of property $authenticationCode.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
148
    }
149
150
    /**
151
     * @return Event[]|ArrayCollection
152
     */
153
    public function getEvents()
154
    {
155
        return $this->events;
156
    }
157
158
    /**
159
     * @return SemesterReport[]|ArrayCollection
160
     */
161
    public function getSemesterReports()
162
    {
163
        return $this->semesterReports;
164
    }
165
166
    public function setVisitOccurred()
167
    {
168
        $this->lastVisitAt = new \DateTime();
169
    }
170
171
    public function getLastVisitAt(): ?DateTime
172
    {
173
        return $this->lastVisitAt;
174
    }
175
176
    /** @noinspection PhpUnused used by deserializer */
177
    public function setAuthenticationCode(string $authenticationCode): void
178
    {
179
        $this->authenticationCode = $authenticationCode;
180
    }
181
}
182