check if key is send

This commit is contained in:
Christopher 2020-10-23 23:42:10 +02:00
parent c52b1836ff
commit 4a7116c5d7
1 changed files with 13 additions and 9 deletions

View File

@ -1,19 +1,23 @@
<?php
if($_REQUEST['MASTERKEY'] == $RUNTIME['SYSTEMKEY'])
if(isset($_REQUEST['MASTERKEY']))
{
$dockerClient = new Docker();
$allContainers = $dockerClient->getAllContainers();
foreach($allContainers as $thisContainer)
if($_REQUEST['MASTERKEY'] == $RUNTIME['SYSTEMKEY'])
{
$apiKey = calcAPIKey($thisContainer);
echo trim(ltrim($thisContainer['Names']['0'], '/'))." == ".$apiKey."<br>\n";
$dockerClient = new Docker();
$allContainers = $dockerClient->getAllContainers();
foreach($allContainers as $thisContainer)
{
$apiKey = calcAPIKey($thisContainer);
echo trim(ltrim($thisContainer['Names']['0'], '/'))." == ".$apiKey."<br>\n";
}
die();
}
die();
}
die("ACCESS DENIED!");