diff --git a/fn/ht.php b/fn/ht.php index 3f49dd0..914172f 100644 --- a/fn/ht.php +++ b/fn/ht.php @@ -22,8 +22,6 @@ function htSetupUserFs($id) { output(500, 'Can\'t create Tor keys directory.'); } - - function checkDomainFormat($domain) { // If the domain must end without a dot if (!filter_var($domain, FILTER_VALIDATE_DOMAIN) OR !preg_match('/^(?=^.{1,254}$)([a-z0-9_-]{1,63}\.){1,126}[a-z0-9]{1,63}$/D', $domain)) @@ -95,7 +93,7 @@ function htDeleteSite($address, $type) { output(500, 'Failed to reload Tor.'); // Delete Tor keys - exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['tor_user'] . ' ' . CONF['ht']['rm_path'] . ' --recursive ' . CONF['ht']['tor_keys_path'] . '/' . $_SESSION['id'] . '/' . $dir, $output, $code); + exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['tor_user'] . ' ' . CONF['ht']['rm_path'] . ' -r ' . CONF['ht']['tor_keys_path'] . '/' . $_SESSION['id'] . '/' . $dir, $output, $code); if ($code !== 0) output(500, 'Failed to delete Tor keys.'); } diff --git a/pg-act/auth/unregister.php b/pg-act/auth/unregister.php index c80dffa..91792a1 100644 --- a/pg-act/auth/unregister.php +++ b/pg-act/auth/unregister.php @@ -24,13 +24,13 @@ if (in_array('ht', $user_services, true)) { foreach (query('select', 'sites', ['username' => $_SESSION['id']]) as $site) htDeleteSite($site['address'], $site['type']); - exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['tor_user'] . ' ' . CONF['ht']['rm_path'] . ' --recursive ' . CONF['ht']['tor_keys_path'] . '/' . $_SESSION['id'], result_code: $code); + exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['tor_user'] . ' ' . CONF['ht']['rm_path'] . ' -r ' . CONF['ht']['tor_keys_path'] . '/' . $_SESSION['id'], result_code: $code); if ($code !== 0) output(500, 'Can\'t remove Tor keys directory.'); removeDirectory(CONF['ht']['tor_config_path'] . '/' . $_SESSION['id']); - exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['sftpgo_user'] . ' ' . CONF['ht']['rm_path'] . ' --recursive ' . CONF['ht']['ht_path'] . '/fs/' . $_SESSION['id'], result_code: $code); + exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['sftpgo_user'] . ' ' . CONF['ht']['rm_path'] . ' -r ' . CONF['ht']['ht_path'] . '/fs/' . $_SESSION['id'], result_code: $code); if ($code !== 0) output(500, 'Can\'t remove user\'s directory.'); }