add login check

This commit is contained in:
Christopher 2020-10-23 23:39:31 +02:00
parent 231fc0a1e9
commit 4e74f5e9a2
1 changed files with 15 additions and 10 deletions

View File

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