add container name check at login

This commit is contained in:
Christopher 2020-10-24 00:16:13 +02:00
parent 0c0269cbe8
commit c7cca2d51a
1 changed files with 6 additions and 3 deletions

View File

@ -9,11 +9,14 @@
foreach($allContainers as $thisContainer)
{
if(isset($thisContainer['Labels']['remotepass']))
if(trim($_POST['containername']) == trim(ltrim($container['Names']['0'], '/')))
{
if(trim($thisContainer['Labels']['remotepass']) == trim($_POST['accesskey']))
if(isset($thisContainer['Labels']['remotepass']))
{
$container = $thisContainer;
if(trim($thisContainer['Labels']['remotepass']) == trim($_POST['accesskey']))
{
$container = $thisContainer;
}
}
}
}