Issues (35)

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.

Message/Part/Options/Options.php (1 issue)

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
 * This file is part of the FirebaseCloudMessagingBundle.
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\FirebaseCloudMessagingBundle\Message\Part\Options;
14
15
/**
16
 * Class Options.
17
 *
18
 * Set of options that can be used to change default behaviour of FCM notification.
19
 *
20
 * @author Artem Henvald <[email protected]>
21
 */
22
final class Options implements OptionsInterface
23
{
24
    /**
25
     * Default `time_to_live` option value is 4 weeks (it is also the maximum TTL allowed for FCM).
26
     * In seconds it is 60 seconds * 60 minutes * 24 hours * 28 days = 2419200 seconds.
27
     */
28
    public const DEFAULT_TTL_IN_SECONDS = 2419200;
29
30
    private string $collapseKey = '';
0 ignored issues
show
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
31
32
    private string $priority = Priority::NORMAL;
33
34
    private bool $contentAvailable = false;
35
36
    private bool $mutableContent = false;
37
38
    private int $timeToLive = self::DEFAULT_TTL_IN_SECONDS;
39
40
    private string $restrictedPackageName = '';
41
42
    private bool $dryRun = false;
43
44
    /**
45
     * @param string $collapseKey
46
     *
47
     * @return $this
48
     */
49
    public function setCollapseKey(string $collapseKey): self
50
    {
51
        $this->collapseKey = $collapseKey;
52
53
        return $this;
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function getCollapseKey(): string
60
    {
61
        return $this->collapseKey;
62
    }
63
64
    /**
65
     * @param string $priority
66
     *
67
     * @return $this
68
     */
69
    public function setPriority(string $priority): self
70
    {
71
        $this->priority = $priority;
72
73
        return $this;
74
    }
75
76
    /**
77
     * {@inheritdoc}
78
     */
79
    public function getPriority(): string
80
    {
81
        return $this->priority;
82
    }
83
84
    /**
85
     * @param bool $contentAvailable
86
     *
87
     * @return $this
88
     */
89
    public function setContentAvailable(bool $contentAvailable): self
90
    {
91
        $this->contentAvailable = $contentAvailable;
92
93
        return $this;
94
    }
95
96
    /**
97
     * {@inheritdoc}
98
     */
99
    public function isContentAvailable(): bool
100
    {
101
        return $this->contentAvailable;
102
    }
103
104
    /**
105
     * @param bool $mutableContent
106
     *
107
     * @return $this
108
     */
109
    public function setMutableContent(bool $mutableContent): self
110
    {
111
        $this->mutableContent = $mutableContent;
112
113
        return $this;
114
    }
115
116
    /**
117
     * {@inheritdoc}
118
     */
119
    public function isMutableContent(): bool
120
    {
121
        return $this->mutableContent;
122
    }
123
124
    /**
125
     * @param int $timeToLive
126
     *
127
     * @return $this
128
     */
129
    public function setTimeToLive(int $timeToLive): self
130
    {
131
        $this->timeToLive = $timeToLive;
132
133
        return $this;
134
    }
135
136
    /**
137
     * {@inheritdoc}
138
     */
139
    public function getTimeToLive(): int
140
    {
141
        return $this->timeToLive;
142
    }
143
144
    /**
145
     * @param string $restrictedPackageName
146
     *
147
     * @return $this
148
     */
149
    public function setRestrictedPackageName(string $restrictedPackageName): self
150
    {
151
        $this->restrictedPackageName = $restrictedPackageName;
152
153
        return $this;
154
    }
155
156
    /**
157
     * {@inheritdoc}
158
     */
159
    public function getRestrictedPackageName(): string
160
    {
161
        return $this->restrictedPackageName;
162
    }
163
164
    /**
165
     * @param bool $dryRun
166
     *
167
     * @return $this
168
     */
169
    public function setDryRun(bool $dryRun): self
170
    {
171
        $this->dryRun = $dryRun;
172
173
        return $this;
174
    }
175
176
    /**
177
     * {@inheritdoc}
178
     */
179
    public function isDryRun(): bool
180
    {
181
        return $this->dryRun;
182
    }
183
}
184