Issues (93)

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.

ClashAPI/Member.class.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
class CoC_Member
4
{
5
	protected $memberObj;
6
7
	/**
8
	 * Constructor of CoC_Member
9
	 * 
10
	 * @param $memberObj, obtained by Clan.class.php
11
	 */
12
	public function __construct($memberObj)
13
	{
14
		$this->memberObj = $memberObj;
15
	}
16
	
17
	/**
18
	 * Gets the members tag (id)
19
	 *
20
	 * @return string, tag
21
	 */
22
	public function getTag()
23
	{
24
		return $this->memberObj->tag;
25
	}
26
27
	/**
28
	 * Gets the members name
29
	 *
30
	 * @return string, name
31
	 */
32
	public function getName()
33
	{
34
		return $this->memberObj->name;
35
	}
36
37
	/**
38
	 * Gets the members role ("member", "admin", "coLeader", "leader")
39
	 *
40
	 * @return string, role
41
	 */
42
	public function getRole()
43
	{
44
		return $this->memberObj->role;
45
	}
46
47
	/**
48
	 * Gets the members level
49
	 *
50
	 * @return int, level
51
	 */
52
	public function getLevel()
53
	{
54
		return $this->memberObj->expLevel;
55
	}
56
57
	/**
58
	 * Gets the members league ID
59
	 *
60
	 * @return int, league ID
61
	 */
62
	public function getLeagueId()
63
	{
64
		return $this->memberObj->league->id;
65
	}
66
67
	/**
68
	 * Gets the members league
69
 	 *
70
 	 * @return stdClass
71
 	 */
72
	public function getLeague()
73
	{
74
		return $this->memberObj->league;
75
	}
76
77
	/**
78
	 * Gets the members trophy-count
79
	 *
80
	 * @return int, trophies
81
	 */
82
	public function getTrophies()
83
	{
84
		return $this->memberObj->trophies;
85
	}
86
87
	/**
88
	 * Gets the members rank inside the clan-ranklist
89
	 *
90
	 * @return int, rank
91
	 */
92
	public function getClanRank()
93
	{
94
		return $this->memberObj->clanRank;
95
	}
96
97
	/**
98
	 * Gets the members previous rank inside the clan-ranklist
99
	 *
100
	 * @return int, rank
101
	 */
102
	public function getPreviousClanRank()
103
	{
104
		return $this->memberObj->previousClanRank;
105
	}
106
107
	/**
108
	 * Gets the amount of donations done by the member
109
	 *
110
	 * @return int, donations
111
	 */
112
	public function getDonations()
113
	{
114
		return $this->memberObj->donations;
115
	}
116
117
	/**
118
	 * Gets the amount of donations received by the member
119
	 *
120
	 * @return int, donations
121
	 */
122
	public function getDonationsReceived()
123
	{
124
		return $this->memberObj->donationsReceived;
125
	}
126
	
127
		/**
128
	 * Gets the donation ratio of the member
129
	 *
130
	 * @return int, ratio
131
	 */
132
	public function getDonationsRatio()
133
	{
134
		return round($this->memberObj->donations / (float) max($this->memberObj->donationsReceived, 1), 2);
135
	}
136
}
137
138
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
139