Merge pull request #445 from SimonSickle/patch-1

Protect the langs api call with the apiKey
This commit is contained in:
Claude 2017-09-18 21:15:09 +02:00 committed by GitHub
commit ba6964c0a6

View File

@ -209,6 +209,11 @@ class Api extends Main
function langs()
{
if (config_item('apikey') != $this->input->get('apikey'))
{
die("Invalid API key\n");
}
$languages = $this->languages->get_languages();
echo json_encode($languages);
}