Issues (438)

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.

routes.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
/* zKillboard
3
 * Copyright (C) 2012-2015 EVE-KILL Team and EVSCO.
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU Affero General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU Affero General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Affero General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18
$app->notFound(function () use ($app) {
19
	$app->redirect("..", 302);
20
});
21
22
// Default route
23
$app->get("/(page/:page/)", function ($page = 1) use ($app){
24
	include( "view/index.php" );
25
});
26
27
$app->get("/kills.html/", function($page = "about") use ($app) {
0 ignored issues
show
The parameter $page is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
die("<script type='text/javascript'>location.reload();</script>");
29
});
30
31
//  Information about zKillboard
32
$app->get("/information/(:page/)(:subPage/)", function($page = "about", $subPage = null) use ($app) {
33
	include( "view/information.php" );
34
});
35
36
// Support
37
$app->get("/livechat/", function() use ($app) {
38
	include( "view/livechat.php" );
39
});
40
41
// Tickets
42
$app->map("/tickets/", function() use ($app) {
43
	include( "view/tickets.php" );
44
})->via("GET", "POST");
45
46
$app->map("/tickets/view/:id/", function($id) use ($app) {
47
	include( "view/tickets_view.php" );
48
})->via("GET", "POST");
49
50
// Campaigns
51
$app->map("/campaign/:uri/", function($uri) use($app) {
52
	include( "view/campaign.php" );
53
})->via("GET");
54
55
// Tracker
56
$app->get("/tracker(/page/:page)/", function($page = 1) use ($app) {
57
	include( "view/tracker.php" );
58
});
59
60
// View kills
61
$app->get("/kills/page/:page/", function($page = 1) use ($app) {
62
	$type = NULL;
63
	include( "view/kills.php" );
64
});
65
$app->get("/kills(/:type)(/page/:page)/", function($type = NULL, $page = 1) use ($app) {
66
	include( "view/kills.php" );
67
});
68
69
// View related kills
70
$app->get("/related/:system/:time/(o/:options/)", function($system, $time, $options = "") use ($app) {
71
	include( "view/related.php" );
72
});
73
74
// View Battle Report
75
$app->get("/br/:battleID/", function($battleID) use ($app) {
76
	include( "view/battle_report.php" );
77
});
78
79
// View Battle Report
80
$app->get("/brsave/", function() use ($app) {
81
	include( "view/brsave.php" );
82
});
83
84
// View top
85
$app->get("/top/lasthour/", function() use ($app) {
86
	include( "view/lasthour.php" );
87
});
88
$app->get("/ranks/:pageType/:subType/", function($pageType, $subType) use ($app) {
89
	include( "view/ranks.php" );
90
});
91
92
$app->get("/top(/:type)(/:page)(/:time+)/", function($type = "weekly", $page = NULL, $time = array()) use ($app) {
93
	include( "view/top.php" );
94
});
95
96
// Raw Kill Detail
97
$app->get("/raw/:id/", function($id) use ($app) {
98
		include( "view/raw.php" );
99
});
100
101
// Kill Detail View
102
$app->get("/detail/:id(/:pageview)/", function($id, $pageview = "overview") use ($app) {
103
	$app->redirect("/kill/$id/", 301); // Permanent redirect
104
	die();
105
});
106
$app->get("/kill/:id(/:pageview)/", function($id, $pageview = "overview") use ($app) {
107
	include( "view/detail.php" );
108
})->via("GET", "POST");
109
110
// Search
111
$app->map("/search(/:search)/", function($search = NULL) use ($app) {
112
	include( "view/search.php" );
113
})->via("GET", "POST");
114
115
// Login stuff
116
$app->map("/dlogin/", function() use ($app) {
117
	global $cookie_name, $cookie_time;
118
	include( "view/dlogin.php" );
119
})->via("GET", "POST");
120
121
$app->map("/login/", function() use ($app) {
122
	global $cookie_name, $cookie_time;
123
	include( "view/login.php" );
124
})->via("GET", "POST");
125
126
// Sitemap
127
$app->get("/sitemap/", function() use ($app) {
128
	global $cookie_name, $cookie_time, $baseAddr;
129
	include( "view/sitemap.php" );
130
});
131
132
// Logout
133
$app->get("/logout/", function() use ($app) {
134
	global $cookie_name, $cookie_time, $baseAddr;
135
	include( "view/logout.php" );
136
});
137
138
// Forgot password
139
$app->map("/forgotpassword/", function() use ($app) {
140
	global $cookie_name, $cookie_time;
141
	include( "view/forgotpassword.php" );
142
})->via("GET", "POST");
143
144
// Change password
145
$app->map("/changepassword/:hash/", function($hash) use ($app) {
146
	include( "view/changepassword.php" );
147
})->via("GET", "POST");
148
149
// Register
150
$app->map("/register/", function() use ($app) {
151
	global $cookie_name, $cookie_time;
152
	include( "view/register.php" );
153
})->via("GET", "POST");
154
155
// Account
156
$app->map("/account(/:req)(/:reqid)/", function($req = NULL, $reqid = NULL) use ($app) {
157
	global $cookie_name, $cookie_time;
158
	include( "view/account.php" );
159
})->via("GET", "POST");
160
161
// Moderator
162
$app->map("/moderator(/:req)(/:id)(/page/:page)/", function ($req = NULL, $id = NULL, $page = 1) use ($app) {
163
	global $cookie_name, $cookie_time;
164
	include( "view/moderator.php" );
165
})->via("GET", "POST");
166
167
// EveInfo
168
$app->get("/item/:id/", function($id) use ($app) {
169
	global $oracleURL;
170
	include ("view/item.php" );
171
});
172
173
// StackTrace
174
$app->get("/stacktrace/:hash/", function($hash) use ($app) {
175
	$q = Db::query("SELECT error, url FROM zz_errors WHERE id = :hash", array(":hash" => $hash));
176
	$trace = $q[0]["error"];
177
	$url = $q[0]["url"];
178
	$app->render("/components/stacktrace.html", array("stacktrace" => $trace, "url" => $url));
179
});
180
181
$app->get("/comments/", function() use ($app) {
182
	$app->render("/comments.html");
183
});
184
185
// API
186
$app->get("/api(/:flags+)/", function($flags = NULL) use ($app) {
187
	include( "view/api.php" );
188
});
189
190
// Kills in the last hour
191
$app->get("/killslasthour/", function() use ($app) {
192
die("<script type='text/javascript'>location.reload();</script>");
193
	die(number_format(Storage::retrieve("KillsLastHour", null)));
194
});
195
196
// Post
197
$app->get("/post/", function() use ($app) {
198
	include( "view/postmail.php" );
199
});
200
$app->post("/post/", function() use ($app) {
201
	include( "view/postmail.php" );
202
});
203
204
// Autocomplete
205
$app->map("/autocomplete/", function() use ($app) {
206
	include( "view/autocomplete.php" );
207
})->via("POST");
208
209
// Intel
210
$app->get("/intel/supers/", function() use ($app) {
211
	include( "view/intel.php" );
212
});
213
214
// primer
215
$app->get("/primer/", function() use ($app) {
216
	include("view/primer.php");
217
});
218
219
// Sharing Crest Mails
220
$app->get("/crestmail/:killID/:hash/", function($killID, $hash) use ($app) {
221
	include("view/crestmail.php");
222
});
223
224
// War!
225
$app->get("/war/:warID/", function($warID) use ($app) {
226
	include("view/war.php");
227
});
228
$app->get("/wars/", function() use ($app) {
229
	include("view/wars.php");
230
});
231
232
// EVE SSO
233
$app->get("/auth/eve/", function() use ($app){
234
	global $ssoEnable;
235
236
	if($ssoEnable == false)
237
		die("SSO is disabled");
238
239
	$code = isset($_GET["code"]) ? $_GET["code"] : null;
240
	$state = isset($_GET["state"]) ? $_GET["state"] : null;
241
	//header("Content-type: application/json;charset=utf-8");
242
243
	if(!$code)
244
	{
245
		echo json_encode(array("Error"));
246
		die();
247
	}
248
	OAuth::eveSSOLoginToken($code, $state);
249
});
250
251
// Merge accounts
252
$app->map("/merge/:characterID/", function($characterID) use ($app){
253
	global $ssoEnable;
254
255
	if($ssoEnable == false)
256
		die("SSO is disabled");
257
258
	include("view/merge.php");
259
})->via("GET", "POST");
260
261
// Character
262
$app->get("/character/:character(/:pageType)(/:subPages+)/", function($character, $pageType = "overview", $subPages = array()) use ($app) {
263
		include("view/character.php");
264
});
265
266
// Corporation
267
$app->get("/corporation/:corporation(/:pageType)(/:subPages+)/", function($corporation, $pageType = "overview", $subPages = array()) use ($app) {
268
		include("view/corporation.php");
269
});
270
271
// Alliance
272
$app->get("/alliance/:alliance(/:pageType)(/:subPages+)/", function($alliance, $pageType = "overview", $subPages = array()) use ($app) {
273
		include("view/alliance.php");
274
});
275
276
// Faction
277
$app->get("/faction/:faction(/:pageType)(/:subPages+)/", function($faction, $pageType = "overview", $subPages = array()) use ($app) {
278
		include("view/faction.php");
279
});
280
281
// System
282
$app->get("/system/:solarSystem(/:pageType)(/:subPages+)/", function($solarSystem, $pageType = "overview", $subPages = array()) use ($app) {
283
		include("view/system.php");
284
});
285
286
// Region
287
$app->get("/region/:region(/:pageType)(/:subPages+)/", function($region, $pageType = "overview", $subPages = array()) use ($app) {
288
		include("view/region.php");
289
});
290
291
// Ship
292
$app->get("/ship/:shipType(/:pageType)(/:subPages+)/", function($shipType, $pageType = "overview", $subPages = array()) use ($app) {
293
		include("view/ship.php");
294
});
295
296
// Group
297
$app->get("/group/:group(/:pageType)(/:subPages+)/", function($group, $pageType = "overview", $subPages = array()) use ($app) {
298
		include("view/group.php");
299
});
300
301
// The Overview stuff
302
$app->get("/:input+/", function($input) use ($app) {
303
	include("view/overview.php");
304
});
305