Issues (1240)

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.

modules/flot/libraries/Flot.php (1 issue)

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 defined('SYSPATH') or die('No direct access allowed.');
2
/**
3
 * Flot (jQuery plotting plugin) Kohana integration.
4
 *
5
 * $Id: Flot.php 3769 2008-12-15 00:48:56Z zombor $
6
 *
7
 * @package    Flot
8
 * @author     Woody Gilk
9
 * @copyright  (c) 2007-2008 Kohana Team
10
 * @license    http://kohanaphp.com/license.html
11
 */
12
class Flot_Core
13
{
14
15
    // Container type and attributes
16
    protected $type = 'div';
17
    protected $attr = array();
18
19
    // Dataset and options
20
    protected $dataset;
21
    protected $options;
22
23
    public function __construct($id, $attr = array(), $type = null)
24
    {
25
        // Set the id to the attributes
26
        $attr['id'] = $id;
27
28
        // Set the attributes of the container
29
        $this->attr += $attr;
30
31
        // Set the type, if not NULL
32
        empty($type) or $this->type = $type;
33
34
        // Create the data set array
35
        $this->dataset = array();
36
37
        // Create the options object
38
        $this->options = new StdClass;
39
    }
40
41
    public function __get($key)
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
42
    {
43
        if (! isset($this->options->$key)) {
44
            // Create the object if it does not exist
45
            $this->options->$key = new StdClass;
46
        }
47
48
        // Return the option
49
        return $this->options->$key;
50
    }
51
52
    public function __set($key, $value)
53
    {
54
        // Set the option value
55
        $this->options->$key = $value;
56
    }
57
58
    /**
59
     * Return the rendered graph as an HTML string.
60
     *
61
     * @return string
62
     */
63
    public function __toString()
64
    {
65
        return $this->render();
66
    }
67
68
    /**
69
     * Add data to the data set.
70
     *
71
     * @chainable
72
     * @param   object   a constructed Flot_Dataset
73
     * @return  Flot_Core
74
     */
75
    public function add(Flot_Dataset $set, $label = null)
76
    {
77
        // Add the label, if requested
78
        empty($label) or $set->label = $label;
79
80
        // Add the set to the current data set
81
        $this->dataset[] = $set;
82
83
        return $this;
84
    }
85
86
    /**
87
     * Set options.
88
     *
89
     * @chainable
90
     * @param   string  option name
91
     * @param   mixed   options value
92
     * @return  Flot_Core
93
     */
94
    public function set($key, $value)
95
    {
96
        // Set the requested value
97
        $this->__set($key, $value);
98
99
        return $this;
100
    }
101
102
    /**
103
     * Return the rendered graph as an HTML string.
104
     *
105
     * @return string
106
     */
107
    public function render($template = 'kohana_flot')
108
    {
109
        // Load the template
110
        return View::factory($template)
111
            // Set container properties
112
            ->set('type', $this->type)
113
            ->set('attr', $this->attr)
114
            // JSON encode the dataset and options
115
            ->set('dataset', array_map('json_encode', $this->dataset))
116
            ->set('options', json_encode($this->options))
117
            // And return the rendered view
118
            ->render();
119
    }
120
} // End Flot
121