Issues (3)

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.

src/Event.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 Edofre\Fullcalendar;
4
5
/**
6
 * Class Event
7
 * @package Edofre\Fullcalendar
8
 */
9
class Event
10
{
11
    /** Rendering options */
12
    const RENDERING_BACKGROUND = 'background';
13
    const RENDERING_INVERSE_BACKGROUND = 'inverse-background';
14
15
    /** @var  string Uniquely identifies the given event. Different instances of repeating events should all have the same id. */
16
    public $id;
17
    /** @var  string The text on an event's element */
18
    public $title;
19
    /** @var  boolean Whether an event occurs at a specific time-of-day. This property affects whether an event's time is shown. Also, in the agenda views, determines if it is displayed in the "all-day" section. */
20
    public $allDay = false;
21
    /** @var  string The date/time an event begins. A Moment-ish input, like an ISO8601 string. Throughout the API this will become a real Moment object. */
22
    public $start;
23
    /** @var  string The exclusive date/time an event ends. A Moment-ish input, like an ISO8601 string. Throughout the API this will become a real Moment object. */
24
    public $end;
25
    /** @var  string A URL that will be visited when this event is clicked by the user. For more information on controlling this behavior, see the eventClick callback. */
26
    public $url;
27
    /** @var  string|array A CSS class ( or array of classes) that will be attached to this event's element. */
28
    public $className;
29
    /** @var  boolean Is the Event editable? Both start and duration. */
30
    public $editable = false;
31
    /** @var  boolean Is the event start editable? */
32
    public $startEditable = false;
33
    /** @var  boolean Is the event duration editable? */
34
    public $durationEditable = false;
35
    /** @var  string Allows alternate rendering of the event, like background events. Can be empty, "background", or "inverse-background" */
36
    public $rendering;
37
    /** @var  boolean  Overrides the master eventOverlap option for this single event. If false, prevents this event from being dragged/resized over other events. Also prevents other events from being dragged/resized over this event. */
38
    public $overlap = true;
39
    /** @var  string an event ID, "businessHours", object. Optional. Overrides the master eventConstraint option for this single event. */
40
    public $constraint;
41
    /** @var  string Event Source Object. Automatically populated. A reference to the event source that this event came from. */
42
    public $source;
43
    /** @var  string Sets an event's background and border color just like the calendar-wide eventColor option. */
44
    public $color;
45
    /** @var  string Sets an event's background color just like the calendar-wide eventBackgroundColor option. */
46
    public $backgroundColor;
47
    /** @var  string Sets an event's border color just like the the calendar-wide eventBorderColor option. */
48
    public $borderColor;
49
    /** @var  string Sets an event's text color just like the calendar-wide eventTextColor option. */
50
    public $textColor;
51
52
    /** @var  array Validation rules */
53
    public $rules = [
54
        'id'               => '',
55
        'title'            => 'required',
56
        'allDay'           => '',
57
        'start'            => 'required',
58
        'end'              => '',
59
        'url'              => '',
60
        'className'        => '',
61
        'editable'         => 'boolean',
62
        'startEditable'    => 'boolean',
63
        'durationEditable' => 'boolean',
64
        'rendering'        => '',
65
        'overlap'          => 'boolean',
66
        'constraint'       => '',
67
        'source'           => '',
68
        'color'            => '',
69
        'backgroundColor'  => '',
70
        'borderColor'      => '',
71
        'textColor'        => '',
72
    ];
73
74
    /**
75
     * Event constructor.
76
     * @param $args
77
     */
78
    function __construct($args)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
79
    {
80
        foreach ($args as $key => $value) {
81
            $this->$key = $value;
82
83
            // if we have start and end date keys we need to convert them
84
            if (in_array($key, ['start', 'end'])) {
85
                $this->$key = !is_null($value) ? $value->toIso8601String() : null;
86
            }
87
        }
88
    }
89
}
90