Issues (1844)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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.

amenadiel/jpgraph/src/graph/RadarLinearTicks.php (2 issues)

Severity
1
<?php
2
3
/**
4
 * JPGraph v4.0.3
5
 */
6
7
namespace Amenadiel\JpGraph\Graph;
8
9
use Amenadiel\JpGraph\Util;
10
11
/**
12
 * @class RadarLinear
13
 * // Description: Linear ticks
14
 */
15
class RadarLinearTicks extends Ticks
16
{
17
    private $minor_step    = 1;
18
    private $major_step    = 2;
19
    private $xlabel_offset = 0;
0 ignored issues
show
The private property $xlabel_offset is not used, and could be removed.
Loading history...
20
    private $xtick_offset  = 0;
0 ignored issues
show
The private property $xtick_offset is not used, and could be removed.
Loading history...
21
22
    public function __construct()
23
    {
24
        // Empty
25
    }
26
27
    // Return major step size in world coordinates
28
    public function GetMajor()
29
    {
30
        return $this->major_step;
31
    }
32
33
    // Return minor step size in world coordinates
34
    public function GetMinor()
35
    {
36
        return $this->minor_step;
37
    }
38
39
    // Set Minor and Major ticks (in world coordinates)
40
    public function Set($aMajStep, $aMinStep = false)
41
    {
42
        if ($aMinStep == false) {
43
            $aMinStep = $aMajStep;
44
        }
45
46
        if ($aMajStep <= 0 || $aMinStep <= 0) {
47
            Util\JpGraphError::RaiseL(25064);
48
            //Util\JpGraphError::Raise(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem.");
49
        }
50
51
        $this->major_step = $aMajStep;
52
        $this->minor_step = $aMinStep;
53
        $this->is_set     = true;
54
    }
55
56
    public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
57
    {
58
        // Prepare to draw linear ticks
59
        $maj_step_abs = abs($aScale->scale_factor * $this->major_step);
60
        $min_step_abs = abs($aScale->scale_factor * $this->minor_step);
61
        $nbrmaj       = round($aScale->world_abs_size / $maj_step_abs);
62
        $nbrmin       = round($aScale->world_abs_size / $min_step_abs);
63
        $skip         = round($nbrmin / $nbrmaj); // Don't draw minor on top of major
64
65
        // Draw major ticks
66
        $ticklen2 = $this->major_abs_size;
67
        $dx       = round(sin($aAxisAngle) * $ticklen2);
68
        $dy       = round(cos($aAxisAngle) * $ticklen2);
69
        $label    = $aScale->scale[0] + $this->major_step;
70
71
        $aImg->SetLineWeight($this->weight);
72
73
        $aMajPos   = [];
74
        $aMajLabel = [];
75
76
        for ($i = 1; $i <= $nbrmaj; ++$i) {
77
            $xt = round($i * $maj_step_abs * cos($aAxisAngle)) + $aScale->scale_abs[0];
78
            $yt = $aPos - round($i * $maj_step_abs * sin($aAxisAngle));
79
80
            if ($this->label_formfunc != '') {
81
                $f = $this->label_formfunc;
82
                $l = call_user_func($f, $label);
83
            } else {
84
                $l = $label;
85
            }
86
87
            $aMajLabel[] = $l;
88
            $label += $this->major_step;
89
            $grid[]                    = $xt;
90
            $grid[]                    = $yt;
91
            $aMajPos[($i - 1) * 2]     = $xt + 2 * $dx;
92
            $aMajPos[($i - 1) * 2 + 1] = $yt - $aImg->GetFontheight() / 2;
93
            if (!$this->supress_tickmarks) {
94
                if ($this->majcolor != '') {
95
                    $aImg->PushColor($this->majcolor);
96
                }
97
                $aImg->Line($xt + $dx, $yt + $dy, $xt - $dx, $yt - $dy);
98
                if ($this->majcolor != '') {
99
                    $aImg->PopColor();
100
                }
101
            }
102
        }
103
104
        // Draw minor ticks
105
        $ticklen2 = $this->minor_abs_size;
106
        $dx       = round(sin($aAxisAngle) * $ticklen2);
107
        $dy       = round(cos($aAxisAngle) * $ticklen2);
108
        if (!$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
109
            if ($this->mincolor != '') {
110
                $aImg->PushColor($this->mincolor);
111
            }
112
            for ($i = 1; $i <= $nbrmin; ++$i) {
113
                if (($i % $skip) == 0) {
114
                    continue;
115
                }
116
                $xt = round($i * $min_step_abs * cos($aAxisAngle)) + $aScale->scale_abs[0];
117
                $yt = $aPos - round($i * $min_step_abs * sin($aAxisAngle));
118
                $aImg->Line($xt + $dx, $yt + $dy, $xt - $dx, $yt - $dy);
119
            }
120
            if ($this->mincolor != '') {
121
                $aImg->PopColor();
122
            }
123
        }
124
    }
125
}
126