Issues (57)

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.

Dispatcher/GearmanCallbacksDispatcher.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
/**
4
 * Gearman Bundle for Symfony2 / Symfony3
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Mkk\GearmanBundle\Dispatcher;
15
16
use GearmanTask;
17
use Mkk\GearmanBundle\Dispatcher\Abstracts\AbstractGearmanDispatcher;
18
use Mkk\GearmanBundle\Event\GearmanClientCallbackCompleteEvent;
19
use Mkk\GearmanBundle\Event\GearmanClientCallbackCreatedEvent;
20
use Mkk\GearmanBundle\Event\GearmanClientCallbackDataEvent;
21
use Mkk\GearmanBundle\Event\GearmanClientCallbackExceptionEvent;
22
use Mkk\GearmanBundle\Event\GearmanClientCallbackFailEvent;
23
use Mkk\GearmanBundle\Event\GearmanClientCallbackStatusEvent;
24
use Mkk\GearmanBundle\Event\GearmanClientCallbackWarningEvent;
25
use Mkk\GearmanBundle\Event\GearmanClientCallbackWorkloadEvent;
26
use Mkk\GearmanBundle\GearmanEvents;
27
28
/**
29
 * Gearman callbacks
30
 */
31
class GearmanCallbacksDispatcher extends AbstractGearmanDispatcher
32
{
33
    /**
34
     * Assign all GearmanClient callbacks as Symfony2 events
35
     *
36
     * @param \GearmanClient $gearmanClient Gearman client
37
     *
38
     * @return GearmanCallbacksDispatcher self Object
0 ignored issues
show
Should the return type not be GearmanCallbacksDispatcher|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
39
     */
40
    public function assignTaskCallbacks(\GearmanClient $gearmanClient)
41
    {
42
        $gearmanClient->setCompleteCallback(array(
43
            $this,
44
            'assignCompleteCallback'
45
        ));
46
47
        $gearmanClient->setFailCallback(array(
48
            $this,
49
            'assignFailCallback'
50
        ));
51
52
        $gearmanClient->setDataCallback(array(
53
            $this,
54
            'assignDataCallback'
55
        ));
56
57
        $gearmanClient->setCreatedCallback(array(
58
            $this,
59
            'assignCreatedCallback'
60
        ));
61
62
        $gearmanClient->setExceptionCallback(array(
63
            $this,
64
            'assignExceptionCallback'
65
        ));
66
67
        $gearmanClient->setStatusCallback(array(
68
            $this,
69
            'assignStatusCallback'
70
        ));
71
72
        $gearmanClient->setWarningCallback(array(
73
            $this,
74
            'assignWarningCallback'
75
        ));
76
77
        $gearmanClient->setWorkloadCallback(array(
78
            $this,
79
            'assignWorkloadCallback'
80
        ));
81
    }
82
83
    /**
84
     * Assigns CompleteCallback into GearmanTask
85
     *
86
     * @param GearmanTask $gearmanTask Gearman Task
87
     *
88
     * @see http://www.php.net/manual/en/gearmanclient.setcompletecallback.php
89
     */
90
    public function assignCompleteCallback(GearmanTask $gearmanTask, $contextReference = null)
91
    {
92
        $event = new GearmanClientCallbackCompleteEvent($gearmanTask);
93
        if (!is_null($contextReference)) {
94
            $event->setContext($contextReference);
95
        }
96
        $this->eventDispatcher->dispatch(
97
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_COMPLETE,
98
            $event
99
        );
100
    }
101
102
    /**
103
     * Assigns FailCallback into GearmanTask
104
     *
105
     * @param GearmanTask $gearmanTask Gearman Task
106
     *
107
     * @see http://www.php.net/manual/en/gearmanclient.setfailcallback.php
108
     */
109
    public function assignFailCallback(GearmanTask $gearmanTask)
110
    {
111
        $event = new GearmanClientCallbackFailEvent($gearmanTask);
112
        $this->eventDispatcher->dispatch(
113
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_FAIL,
114
            $event
115
        );
116
    }
117
118
    /**
119
     * Assigns DataCallback into GearmanTask
120
     *
121
     * @param GearmanTask $gearmanTask Gearman Task
122
     *
123
     * @see http://www.php.net/manual/en/gearmanclient.setdatacallback.php
124
     */
125
    public function assignDataCallback(GearmanTask $gearmanTask)
126
    {
127
        $event = new GearmanClientCallbackDataEvent($gearmanTask);
128
        $this->eventDispatcher->dispatch(
129
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_DATA,
130
            $event
131
        );
132
    }
133
134
    /**
135
     * Assigns CreatedCallback into GearmanTask
136
     *
137
     * @param GearmanTask $gearmanTask Gearman task
138
     *
139
     * @see http://www.php.net/manual/en/gearmanclient.setcreatedcallback.php
140
     */
141
    public function assignCreatedCallback(GearmanTask $gearmanTask)
142
    {
143
        $event = new GearmanClientCallbackCreatedEvent($gearmanTask);
144
        $this->eventDispatcher->dispatch(
145
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_CREATED,
146
            $event
147
        );
148
    }
149
150
    /**
151
     * Assigns ExceptionCallback into GearmanTask
152
     *
153
     * @see http://www.php.net/manual/en/gearmanclient.setexceptioncallback.php
154
     */
155
    public function assignExceptionCallback(GearmanTask $gearmanTask)
156
    {
157
        $event = new GearmanClientCallbackExceptionEvent($gearmanTask);
158
        $this->eventDispatcher->dispatch(
159
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_EXCEPTION,
160
            $event
161
        );
162
    }
163
164
    /**
165
     * Assigns StatusCallback into GearmanTask
166
     *
167
     * @param GearmanTask $gearmanTask Gearman Task
168
     *
169
     * @see http://www.php.net/manual/en/gearmanclient.setstatuscallback.php
170
     */
171
    public function assignStatusCallback(GearmanTask $gearmanTask)
172
    {
173
        $event = new GearmanClientCallbackStatusEvent($gearmanTask);
174
        $this->eventDispatcher->dispatch(
175
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_STATUS,
176
            $event
177
        );
178
    }
179
180
    /**
181
     * Assigns WarningCallback into GearmanTask
182
     *
183
     * @param GearmanTask $gearmanTask Gearman Task
184
     *
185
     * @see http://www.php.net/manual/en/gearmanclient.setwarningcallback.php
186
     */
187
    public function assignWarningCallback(GearmanTask $gearmanTask)
188
    {
189
        $event = new GearmanClientCallbackWarningEvent($gearmanTask);
190
        $this->eventDispatcher->dispatch(
191
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_WARNING,
192
            $event
193
        );
194
    }
195
196
    /**
197
     * Assigns WorkloadCallback into GearmanTask
198
     *
199
     * @param GearmanTask $gearmanTask Gearman Task
200
     *
201
     * @see http://www.php.net/manual/en/gearmanclient.setworkloadcallback.php
202
     */
203
    public function assignWorkloadCallback(GearmanTask $gearmanTask)
204
    {
205
        $event = new GearmanClientCallbackWorkloadEvent($gearmanTask);
206
        $this->eventDispatcher->dispatch(
207
            GearmanEvents::GEARMAN_CLIENT_CALLBACK_WORKLOAD,
208
            $event
209
        );
210
    }
211
}
212