Issues (36)

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/Api/WuBookChannelManager.php (2 issues)

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
/*
4
 * This file is part of Laravel WuBook.
5
 *
6
 * (c) Filippo Galante <[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 IlGala\LaravelWubook\Api;
13
14
use IlGala\LaravelWubook\Api\WuBookApi;
15
16
/**
17
 * Description of WuBookChannelManager
18
 *
19
 * @author Filippo Galante <[email protected]>
20
 */
21
class WuBookChannelManager extends WuBookApi
22
{
23
24
    /**
25
     * @var string
26
     */
27
    private $token;
28
29
    /**
30
     * Create a new WuBookRooms Instance.
31
     */
32
    public function __construct($config, $cache, $client, $token = null)
33
    {
34
        parent::__construct($config, $cache, $client);
35
36
        $this->token = $token;
37
    }
38
39
    /**
40
     * http://tdocs.wubook.net/wired/woodoo.html#get_channel_symbols
41
     *
42
     * @return mixed
43
     */
44
    public function get_channel_symbols()
45
    {
46
        return $this->call_method($this->token, 'get_channel_symbols', [], ['token' => $this->get_token($this->token)]);
0 ignored issues
show
The call to WuBookChannelManager::call_method() has too many arguments starting with array('token' => $this->get_token($this->token)).

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
47
    }
48
49
    /**
50
     * http://tdocs.wubook.net/wired/woodoo.html#get_otas
51
     *
52
     * @return mixed
53
     */
54
    public function get_otas()
55
    {
56
        return $this->call_method($this->token, 'get_otas', []);
57
    }
58
59
    /**
60
     * http://tdocs.wubook.net/wired/woodoo.html#tag_ota
61
     *
62
     * @param int $chid
63
     * @param string $tag
64
     * @return mixed
65
     */
66
    public function tag_ota($chid, $tag)
67
    {
68
        return $this->call_method($this->token, '', [$chid, $tag]);
69
    }
70
71
    /**
72
     * http://tdocs.wubook.net/wired/woodoo.html#new_ota
73
     *
74
     * @param int $ctype
75
     * @param string $tag
76
     * @return mixed
77
     */
78
    public function new_ota($ctype, $tag = '')
79
    {
80
        return $this->call_method($this->token, '', [$ctype, $tag]);
81
    }
82
83
    /**
84
     * http://tdocs.wubook.net/wired/woodoo.html#ota_running
85
     *
86
     * @param int $chid
87
     * @return mixed
88
     */
89
    public function ota_running($chid)
90
    {
91
        return $this->call_method($this->token, 'ota_running', [$chid]);
92
    }
93
94
    /**
95
     * http://tdocs.wubook.net/wired/woodoo.html#fetch_rsrv_errors
96
     *
97
     * @return mixed
98
     */
99
    public function fetch_rsrv_errors()
100
    {
101
        return $this->call_method($this->token, 'fetch_rsrv_errors');
102
    }
103
104
    /**
105
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_start_procedure
106
     *
107
     * @param int $chid
108
     * @param int $bhid
109
     * @return mixed
110
     */
111
    public function bcom_start_procedure($chid, $bhid)
112
    {
113
        return $this->call_method($this->token, 'bcom_start_procedure', [$chid, $bhid]);
114
    }
115
116
    /**
117
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_confirm_activation
118
     *
119
     * @param int $chid
120
     * @return mixed
121
     */
122
    public function bcom_confirm_activation($chid)
123
    {
124
        return $this->call_method($this->token, 'bcom_confirm_activation', [$chid]);
125
    }
126
127
    /**
128
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_init_channel
129
     *
130
     * @param int $chid
131
     * @param string $currency
132
     * @return mixed
133
     */
134
    public function bcom_init_channel($chid, $currency)
135
    {
136
        return $this->call_method($this->token, 'bcom_init_channel', [$chid, $currency]);
137
    }
138
139
    /**
140
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_rooms_rates
141
     *
142
     * @param int $chid
143
     * @return mixed
144
     */
145
    public function bcom_rooms_rates($chid)
146
    {
147
        return $this->call_method($this->token, 'bcom_rooms_rates', [$chid]);
148
    }
149
150
    /**
151
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_set_room_mapping
152
     *
153
     * @param int $chid
154
     * @param array $rmap
155
     * @param int $singlemap 0|1
156
     * @return mixed
157
     */
158
    public function bcom_set_room_mapping($chid, $rmap, $singlemap = 0)
159
    {
160
        return $this->call_method($this->token, 'bcom_set_room_mapping', [$chid, $rmap, $singlemap]);
161
    }
162
163
    /**
164
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_set_rate_mapping
165
     *
166
     * @param int $chid
167
     * @param array $rmap
168
     * @return mixed
169
     */
170
    public function bcom_set_rate_mapping($chid, $rmap)
171
    {
172
        return $this->call_method($this->token, 'bcom_set_rate_mapping', [$chid, $rmap]);
173
    }
174
175
    /**
176
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_read_allotments
177
     *
178
     * @param int $chid
179
     * @param string $dfrom
180
     * @param int $days
181
     * @return mixed
182
     */
183
    public function bcom_read_allotments($chid, $dfrom, $days)
184
    {
185
        return $this->call_method($this->token, '', [$chid, $dfrom, $days]);
186
    }
187
188
    /**
189
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_notify_noshow
190
     *
191
     * @param string $rcode
192
     * @return mixed
193
     */
194
    public function bcom_notify_noshow($rcode)
195
    {
196
        return $this->call_method($this->token, 'bcom_notify_noshow', [$rcode]);
197
    }
198
199
    /**
200
     * http://tdocs.wubook.net/wired/woodoo.html#bcom_notify_invalid_cc
201
     *
202
     * @param string $rcode
203
     * @return mixed
204
     */
205
    public function bcom_notify_invalid_cc($rcode)
206
    {
207
        return $this->call_method($this->token, 'bcom_notify_invalid_cc', [$rcode]);
208
    }
209
210
    /**
211
     * http://tdocs.wubook.net/wired/woodoo.html#exp_start_procedure
212
     *
213
     * @param int $chid
214
     * @param int $ehid
215
     * @return mixed
216
     */
217
    public function exp_start_procedure($chid, $ehid)
218
    {
219
        return $this->call_method($this->token, 'exp_start_procedure', [$chid, $ehid]);
220
    }
221
222
    /**
223
     * http://tdocs.wubook.net/wired/woodoo.html#exp_vat_models
224
     *
225
     * @return mixed
226
     */
227
    public function exp_vat_models()
228
    {
229
        return $this->call_method($this->token, 'exp_vat_models', [], ['token' => $this->get_token($this->token)]);
0 ignored issues
show
The call to WuBookChannelManager::call_method() has too many arguments starting with array('token' => $this->get_token($this->token)).

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
230
    }
231
232
    /**
233
     * http://tdocs.wubook.net/wired/woodoo.html#exp_init_channel
234
     *
235
     * @param int $chid
236
     * @param string $currency
237
     * @param float $fee
238
     * @param float $vat_taxes
239
     * @return mixed
240
     */
241
    public function exp_init_channel($chid, $currency, $fee, $vat_taxes)
242
    {
243
        return $this->call_method($this->token, 'exp_init_channel', [$chid, $currency, $fee, $vat_taxes]);
244
    }
245
246
    /**
247
     * http://tdocs.wubook.net/wired/woodoo.html#exp_rooms_rates
248
     *
249
     * @param int $chid
250
     * @return mixed
251
     */
252
    public function exp_rooms_rates($chid)
253
    {
254
        return $this->call_method($this->token, 'exp_rooms_rates', [$chid]);
255
    }
256
257
    /**
258
     * http://tdocs.wubook.net/wired/woodoo.html#exp_set_room_mapping
259
     *
260
     * @param int $chid
261
     * @param array $rmap
262
     * @param array $allots
263
     * @return mixed
264
     */
265
    public function exp_set_room_mapping($chid, $rmap, $allots = [])
266
    {
267
        return $this->call_method($this->token, 'exp_set_room_mapping', [$chid, $rmap, $allots]);
268
    }
269
270
    /**
271
     * http://tdocs.wubook.net/wired/woodoo.html#exp_set_rate_mapping
272
     *
273
     * @param int $chid
274
     * @param array $rmap
275
     * @return mixed
276
     */
277
    public function exp_set_rate_mapping($chid, $rmap)
278
    {
279
        return $this->call_method($this->token, 'exp_set_rate_mapping', [$chid, $rmap]);
280
    }
281
282
    /**
283
     * http://tdocs.wubook.net/wired/woodoo.html#exp_set_preferences
284
     *
285
     * @param int $chid
286
     * @param boolean $hct
287
     * @param string $minstay_error_behaviour
288
     * @param string $minstay_type
289
     * @param string $last_rate
290
     * @return mixed
291
     */
292
    public function exp_set_preferences($chid, $hct, $minstay_error_behaviour, $minstay_type, $last_rate = '')
293
    {
294
        return $this->call_method($this->token, 'exp_set_preferences', [$chid, $hct, $minstay_error_behaviour, $minstay_type, $last_rate]);
295
    }
296
297
    /**
298
     * http://tdocs.wubook.net/wired/woodoo.html#woodoo_suspended_commands
299
     *
300
     * @return mixed
301
     */
302
    public function woodoo_suspended_commands()
303
    {
304
        return $this->call_method($this->token, 'woodoo_suspended_commands');
305
    }
306
307
    /**
308
     * http://tdocs.wubook.net/wired/woodoo.html#woodoo_executed_commands
309
     *
310
     * @param string $day
311
     * @param boolean|int $chid
312
     * @return mixed
313
     */
314
    public function woodoo_executed_commands($day, $chid = false)
315
    {
316
        return $this->call_method($this->token, 'woodoo_executed_commands', [$day, $chid]);
317
    }
318
319
    /**
320
     * http://tdocs.wubook.net/wired/woodoo.html#woodoo_cancel_suspended
321
     *
322
     * @param array $trackings
323
     * @return mixed
324
     */
325
    public function woodoo_cancel_suspended($trackings)
326
    {
327
        return $this->call_method($this->token, 'woodoo_cancel_suspended', [$trackings]);
328
    }
329
330
    /**
331
     * http://tdocs.wubook.net/wired/woodoo.html#woodoo_relaunch_suspended
332
     *
333
     * @param array $trackings
334
     * @return mixed
335
     */
336
    public function woodoo_relaunch_suspended($trackings)
337
    {
338
        return $this->call_method($this->token, 'woodoo_relaunch_suspended', [$trackings]);
339
    }
340
341
    /**
342
     * http://tdocs.wubook.net/wired/woodoo.html#last_room_channels
343
     *
344
     * @param array $up_channels
345
     * @return mixed
346
     */
347
    public function last_room_channels($up_channels = [])
348
    {
349
        return $this->call_method($this->token, 'last_room_channels', [$up_channels]);
350
    }
351
}
352