mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 09:00:27 +00:00
update
This commit is contained in:
parent
3909f79ee9
commit
3b60ba1d77
2 changed files with 13 additions and 13 deletions
|
@ -110,7 +110,7 @@ class HostingSubscription extends Model
|
|||
$createLinuxWebUser = new CreateLinuxWebUser();
|
||||
$createLinuxWebUser->setUsername($systemUsername);
|
||||
$createLinuxWebUser->setPassword($systemPassword);
|
||||
$createLinuxWebUserOutput = $createLinuxWebUser->handle();
|
||||
$createLinuxWebUserOutput = $createLinuxWebUser->handle();
|
||||
|
||||
if (strpos($createLinuxWebUserOutput, 'Creating home directory') !== false) {
|
||||
|
||||
|
|
|
@ -109,18 +109,18 @@ class SecurityTest extends ActionTestCase
|
|||
$this->assertTrue($callHostingSubscriptionStoreResponse['status'] == 'ok');
|
||||
$secondHostingSubscription = $callHostingSubscriptionStoreResponse['data']['hostingSubscription'];
|
||||
|
||||
// // Try to open /home directory with linux user
|
||||
// $output = shell_exec("sudo -H -u ".$hostingSubscription['system_username']." bash -c 'ls -la /home'");
|
||||
// $this->assertSame($output, null);
|
||||
//
|
||||
// // Try to open /home/$user with linux user
|
||||
// $output = shell_exec("sudo -H -u ".$hostingSubscription['system_username']." bash -c 'ls -la /home/".$hostingSubscription['system_username']."'");
|
||||
// $this->assertTrue(str_contains($output, 'public_html'));
|
||||
// $this->assertTrue(str_contains($output, $hostingSubscription['system_username']));
|
||||
//
|
||||
// // Try to open /home/$user directory with another linux user
|
||||
// $output = shell_exec("sudo -H -u ".$secondHostingSubscription['system_username']." bash -c 'ls -la /home/".$hostingSubscription['system_username']."'");
|
||||
// $this->assertSame($output, null);
|
||||
// Try to open /home directory with linux user
|
||||
$output = shell_exec("sudo -H -u ".$hostingSubscription['system_username']." bash -c 'ls -la /home'");
|
||||
$this->assertSame($output, null);
|
||||
|
||||
// Try to open /home/$user with linux user
|
||||
$output = shell_exec("sudo -H -u ".$hostingSubscription['system_username']." bash -c 'ls -la /home/".$hostingSubscription['system_username']."'");
|
||||
$this->assertTrue(str_contains($output, 'public_html'));
|
||||
$this->assertTrue(str_contains($output, $hostingSubscription['system_username']));
|
||||
|
||||
// Try to open /home/$user directory with another linux user
|
||||
$output = shell_exec("sudo -H -u ".$secondHostingSubscription['system_username']." bash -c 'ls -la /home/".$hostingSubscription['system_username']."'");
|
||||
$this->assertSame($output, null);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue