mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-09 00:01:30 +01:00
Return 404 when signature player not found
In most cases it was a request for a non existing file
This commit is contained in:
@@ -35,14 +35,14 @@
|
||||
if(!isset($_REQUEST['name']))
|
||||
die('Please enter name as get or post parameter.');
|
||||
|
||||
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
|
||||
$player = new OTS_Player();
|
||||
$player->find($name);
|
||||
$player->find($_REQUEST['name']);
|
||||
|
||||
if(!$player->isLoaded())
|
||||
{
|
||||
header('Content-type: image/png');
|
||||
readfile(SIGNATURES_IMAGES.'nocharacter.png');
|
||||
//header('Content-type: image/png');
|
||||
//readfile(SIGNATURES_IMAGES.'nocharacter.png');
|
||||
http_response_code(404);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user