Issues (45)

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.

src/Http/Controllers/EventsController.php (2 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
namespace Acacha\Events\Http\Controllers;
4
5
use Acacha\Events\Models\Event;
6
use Illuminate\Http\Request;
7
use Redirect;
8
use Session;
9
10
/**
11
 * Class EventsController.
12
 *
13
 * @package Acacha\Events\Http\Controllers
14
 */
15
class EventsController extends Controller
16
{
17
18
    /**
19
     * Display a listing of the resource.
20
     *
21
     * @return \Illuminate\Http\Response
22
     */
23
    public function index()
24
    {
25
        $events = Event::all();
26
        return view('events::list_events',compact('events'));
27
    }
28
29
    /**
30
     * Show the form for creating a new resource.
31
     *
32
     * @return \Illuminate\Http\Response
33
     */
34
    public function create()
35
    {
36
        return view('events::create_event');
37
    }
38
39
    /**
40
     * Store a newly created resource in storage.
41
     *
42
     * @param  \Illuminate\Http\Request  $request
43
     * @return \Illuminate\Http\Response
44
     */
45
    public function store(Request $request)
46
    {
47
        Event::create($request->only(['name','user_id','description']));
0 ignored issues
show
The method create() does not exist on Acacha\Events\Models\Event. Did you maybe mean created()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
48
49
        Session::flash('status', 'Created ok!');
50
51
        return Redirect::to('/events_php/create');
52
53
    }
54
55
    /**
56
     * Display the specified resource.
57
     *
58
     * @param Event $event
59
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
60
     */
61
    public function show(Event $event)
62
    {
63
        return view('events::show_event',compact('event'));
64
    }
65
66
    /**
67
     * Show the form for editing the specified resource.
68
     *
69
     * @param Event $event
70
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
71
     */
72
    public function edit(Event $event)
73
    {
74
        return view('events::edit_event',['event' => $event]);
75
    }
76
77
    /**
78
     * Update the specified resource in storage.
79
     *
80
     * @param Request $request
81
     * @param Event $event
82
     * @return \Illuminate\Http\RedirectResponse
83
     */
84
    public function update(Request $request, Event $event)
85
    {
86
        $event->update($request->only(['name','description']));
87
88
        Session::flash('status', 'Edited ok!');
89
        return Redirect::to('/events_php/edit/' . $event->id);
0 ignored issues
show
The property id does not exist on object<Acacha\Events\Models\Event>. Since you implemented __get, maybe consider adding a @property annotation.

Since your code implements the magic getter _get, this function will be called for any read access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

If the property has read access only, you can use the @property-read annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
90
    }
91
92
    /**
93
     * Remove the specified resource from storage.
94
     *
95
     * @param Event $event
96
     * @return \Illuminate\Http\RedirectResponse
97
     */
98
    public function destroy(Event $event)
99
    {
100
        $event->delete();
101
        Session::flash('status', 'Event was deleted successful!');
102
        return Redirect::to('/events_php');
103
    }
104
}
105